Patch by Josh Allmann, joshua dot allmann at gmail

Originally committed as revision 23862 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Josh Allmann 2010-06-28 20:37:16 +00:00 committed by Martin Storsjö
parent a494295197
commit bb06ec5ef4

View File

@ -143,23 +143,23 @@ static int amr_handle_packet(AVFormatContext *ctx,
static int amr_parse_fmtp(AVStream *stream, PayloadContext *data, static int amr_parse_fmtp(AVStream *stream, PayloadContext *data,
char *attr, char *value) char *attr, char *value)
{ {
/* Some AMR SDP configurations contain "octet-align", without /* Some AMR SDP configurations contain "octet-align", without
* the trailing =1. Therefore, if the value is empty, * the trailing =1. Therefore, if the value is empty,
* interpret it as "1". * interpret it as "1".
*/ */
if (!strcmp(value, "")) { if (!strcmp(value, "")) {
av_log(NULL, AV_LOG_WARNING, "AMR fmtp attribute %s had " av_log(NULL, AV_LOG_WARNING, "AMR fmtp attribute %s had "
"nonstandard empty value\n", attr); "nonstandard empty value\n", attr);
strcpy(value, "1"); strcpy(value, "1");
} }
if (!strcmp(attr, "octet-align")) if (!strcmp(attr, "octet-align"))
data->octet_align = atoi(value); data->octet_align = atoi(value);
else if (!strcmp(attr, "crc")) else if (!strcmp(attr, "crc"))
data->crc = atoi(value); data->crc = atoi(value);
else if (!strcmp(attr, "interleaving")) else if (!strcmp(attr, "interleaving"))
data->interleaving = atoi(value); data->interleaving = atoi(value);
else if (!strcmp(attr, "channels")) else if (!strcmp(attr, "channels"))
data->channels = atoi(value); data->channels = atoi(value);
return 0; return 0;
} }