avformat/avidec: Fix txts fmts parsing

Fixes: subtitle.avi from vlc/ticket/1162

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2017-05-30 21:20:54 +02:00
parent 0dea0114fb
commit 78f6ec32a3

View File

@ -727,7 +727,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
break;
case MKTAG('s', 't', 'r', 'f'):
/* stream header */
if (!size)
if (!size && (codec_type == AVMEDIA_TYPE_AUDIO ||
codec_type == AVMEDIA_TYPE_VIDEO))
break;
if (stream_index >= (unsigned)s->nb_streams || avi->dv_demux) {
avio_skip(pb, size);