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

---
 libavformat/rtpdec_amr.c |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c
index d3dbf60..e2bd9d6 100644
--- a/libavformat/rtpdec_amr.c
+++ b/libavformat/rtpdec_amr.c
@@ -143,28 +143,30 @@ static int amr_handle_packet(AVFormatContext *ctx,
 static int amr_parse_fmtp(AVStream *stream, PayloadContext *data,
                           char *attr, char *value)
 {
-            /* 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"))
-                data->octet_align = atoi(value);
-            else if (!strcmp(attr, "crc"))
-                data->crc = atoi(value);
-            else if (!strcmp(attr, "interleaving"))
-                data->interleaving = atoi(value);
-            else if (!strcmp(attr, "channels"))
-                data->channels = atoi(value);
-        if (!data->octet_align || data->crc ||
-            data->interleaving || data->channels != 1) {
-            av_log(stream, AV_LOG_ERROR, "Unsupported RTP/AMR configuration!\n");
-            return -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"))
+        data->octet_align = atoi(value);
+    else if (!strcmp(attr, "crc"))
+        data->crc = atoi(value);
+    else if (!strcmp(attr, "interleaving"))
+        data->interleaving = atoi(value);
+    else if (!strcmp(attr, "channels"))
+        data->channels = atoi(value);
+    if (!data->octet_align || data->crc ||
+        data->interleaving || data->channels != 1) {
+        av_log(stream, AV_LOG_ERROR, "Unsupported RTP/AMR configuration!\n");
+        return -1;
+    }
+
     return 0;
 }
 
-- 
1.7.0.4

