[FFmpeg-cvslog] r22631 - trunk/libavformat/rtpdec_amr.c

mstorsjo subversion
Mon Mar 22 15:44:29 CET 2010


Author: mstorsjo
Date: Mon Mar 22 15:44:28 2010
New Revision: 22631

Log:
Interpret valueless attributes in AMR ftmp lines as being 1

Modified:
   trunk/libavformat/rtpdec_amr.c

Modified: trunk/libavformat/rtpdec_amr.c
==============================================================================
--- trunk/libavformat/rtpdec_amr.c	Mon Mar 22 15:42:52 2010	(r22630)
+++ trunk/libavformat/rtpdec_amr.c	Mon Mar 22 15:44:28 2010	(r22631)
@@ -142,6 +142,15 @@ static int amr_parse_sdp_line(AVFormatCo
         while (*p && *p == ' ') p++; /* strip trailing spaces */
 
         while (ff_rtsp_next_attr_and_value(&p, attr, sizeof(attr), value, sizeof(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(s, 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"))



More information about the ffmpeg-cvslog mailing list