demux_mkv: improve robustness against broken libavcodec parsers

The VP9 codec parser has a bug: it doesn't set the data/size pointers
passed to it. As I understand, it must always do this, and in fact, if
it doesn't some libavcodec generic code would be in trouble too.

This helps with #1448, but is not the full fix for it. The codec parser
must be fixed in libavcodec itself.
This commit is contained in:
wm4
2015-01-09 02:10:42 +01:00
parent a37d75d497
commit 33dd9147ae

View File

@@ -2272,8 +2272,8 @@ static bool mkv_parse_packet(mkv_track_t *track, bstr *raw, bstr *out)
}
if (track->av_parser && track->av_parser_codec) {
while (raw->len) {
uint8_t *data;
int size;
uint8_t *data = NULL;
int size = 0;
int len = av_parser_parse2(track->av_parser, track->av_parser_codec,
&data, &size, raw->start, raw->len,
AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0);