aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-03-22 14:44:28 +0000
committerMartin Storsjö <martin@martin.st>2010-03-22 14:44:28 +0000
commit9dff2308ba5d844e8e8453e9cc1b0c2b487a9aad (patch)
treec044f732531fd62a00dd14d2110ff5d4f979eb2f
parent6e69f6c47f844f6991afb0275a56b1c18663b162 (diff)
downloadffmpeg-9dff2308ba5d844e8e8453e9cc1b0c2b487a9aad.tar.gz
Interpret valueless attributes in AMR ftmp lines as being 1
Originally committed as revision 22631 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/rtpdec_amr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c
index d9862c4160..cbf9f28d02 100644
--- a/libavformat/rtpdec_amr.c
+++ b/libavformat/rtpdec_amr.c
@@ -142,6 +142,15 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index,
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"))