#10869: regression in mime-type parsing of http streams with audio/L16
Content-Type
-------------------------------------+-------------------------------------
Reporter: bubbleguuum | Type: defect
Status: new | Priority: normal
Component: avformat | Version:
| unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
http streams whose Content-Type is audio/L16 are not properly handled
anymore, always resulting in this error (for example, as a result of
'ffmpeg -i http://path/to/L16/stream'):
[s16be @ 0xb400006f8e24c7f0] Invalid sample_rate found in mime_type
"audio/L16"
Such streams have a mime-type with "rate" and "channels" parameters. For
example:
{{{
Content-Type: audio/L16;rate=44100;channels=2
}}}
This error is from pcmdec.c as it cannot find the "rate" parameter to
parse.
That's because it is passed the mime-type without its parameters in
http.c, a change that happened in this commit from 8 months ago:
https://github.com/FFmpeg/FFmpeg/commit/0cd2e7dcfbc835f4519f1b2b7da6bd902dbb0190
It can be fixed in two ways:
- revert that commit and let components making used of "mime-type" handle
it properly if it has parameters (so according to this commit's
description, modify the HLS component to handle the eventual mime-type
params)
- add an exception for audio/l16:
{{{
if (av_strncasecmp(p, "audio/l16", 9) == 0) {
s->mime_type = av_strdup(p);
} else {
s->mime_type = av_get_token((const char **)&p, ";");
}
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/10869>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".