# HG changeset patch # User mstorsjo # Date 1269269068 0 # Node ID 7d952a85947ba58a5f1d3ea8e521731cc4f55825 # Parent 57fc219dc951e63b6ed8a747f7c815b4cb2402b7 Interpret valueless attributes in AMR ftmp lines as being 1 diff -r 57fc219dc951 -r 7d952a85947b rtpdec_amr.c --- a/rtpdec_amr.c Mon Mar 22 14:42:52 2010 +0000 +++ b/rtpdec_amr.c Mon Mar 22 14:44:28 2010 +0000 @@ -142,6 +142,15 @@ 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"))