From 7bdebb322bc56dce8eb867c00a7bbe6c64266398 Mon Sep 17 00:00:00 2001
From: Josh Allmann <joshua.allmann@gmail.com>
Date: Mon, 28 Jun 2010 00:46:57 -0700
Subject: [PATCH 11/11] amr rtp cosmetics

---
 libavformat/rtpdec_amr.c |   56 ++++++++++++++++++++++++---------------------
 1 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c
index 0d38a4a..b01afd0 100644
--- a/libavformat/rtpdec_amr.c
+++ b/libavformat/rtpdec_amr.c
@@ -123,32 +123,35 @@ static int amr_handle_packet(AVFormatContext *ctx,
 static int amr_parse_fmtp(AVStream *stream, PayloadContext *data,
                           char *attr, char *value)
 {
-        int octet_align = 0;
-        int crc = 0;
-        int interleaving = 0;
-        int channels = 1;
-
-            /* Some AMR SDP configurations contain "octet-align", without
-             * the trailing =1. Therefore, if the value is empty,
-             * interpret it as "1".
-             */
-            if (!strcmp(value, "")) {
-                av_log(stream, AV_LOG_WARNING, "AMR fmtp attribute %s had "
-                                          "nonstandard empty value\n", attr);
-                strcpy(value, "1");
-            }
-            if (!strcmp(attr, "octet-align"))
-                octet_align = atoi(value);
-            else if (!strcmp(attr, "crc"))
-                crc = atoi(value);
-            else if (!strcmp(attr, "interleaving"))
-                interleaving = atoi(value);
-            else if (!strcmp(attr, "channels"))
-                channels = atoi(value);
-        if (!octet_align || crc || interleaving || channels != 1) {
-            av_log(stream, AV_LOG_ERROR, "Unsupported RTP/AMR configuration!\n");
-            return -1;
-        }
+    int octet_align = 0;
+    int crc = 0;
+    int interleaving = 0;
+    int channels = 1;
+
+    /* Some AMR SDP configurations contain "octet-align", without
+     * the trailing =1. Therefore, if the value is empty,
+     * interpret it as "1".
+     */
+    if (!strcmp(value, "")) {
+        av_log(stream, AV_LOG_WARNING, "AMR fmtp attribute %s had "
+                                        "nonstandard empty value\n", attr);
+        strcpy(value, "1");
+    }
+
+    if (!strcmp(attr, "octet-align"))
+        octet_align = atoi(value);
+    else if (!strcmp(attr, "crc"))
+        crc = atoi(value);
+    else if (!strcmp(attr, "interleaving"))
+        interleaving = atoi(value);
+    else if (!strcmp(attr, "channels"))
+        channels = atoi(value);
+
+    if (!octet_align || crc || interleaving || channels != 1) {
+        av_log(stream, AV_LOG_ERROR, "Unsupported RTP/AMR configuration!\n");
+        return -1;
+    }
+
     return 0;
 }
 
@@ -166,6 +169,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index,
         return ff_parse_fmtp(s->streams[st_index], data, p,
                              &amr_parse_fmtp);
     }
+
     return 0;
 }
 
-- 
1.7.0.4

