diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-20 23:56:17 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-13 16:24:12 +0100 |
commit | 1df64d6c46ed522e74ebf082a0ea3f0dcadc1950 (patch) | |
tree | 73e353f986e16da1946da8995e3635f16ec72da1 /libavformat/flvdec.c | |
parent | 7869b2959d23f9ecca279a84b9cf3cab8863754e (diff) | |
download | ffmpeg-1df64d6c46ed522e74ebf082a0ea3f0dcadc1950.tar.gz |
avformat/flvdec: re enable flv_data_packet()
Found-by: kurosu
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/flvdec.c')
-rw-r--r-- | libavformat/flvdec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 578be5d2dd..0d8b3acf37 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -830,10 +830,15 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) goto skip; } else if (type == FLV_TAG_TYPE_META) { stream_type=FLV_STREAM_TYPE_DATA; - if (size > 13 + 1 + 4 && dts == 0) { // Header-type metadata stuff + if (size > 13 + 1 + 4) { // Header-type metadata stuff + int type; meta_pos = avio_tell(s->pb); - if (flv_read_metabody(s, next) <= 0) { + type = flv_read_metabody(s, next); + if (type == 0 && dts == 0 || type < 0) { goto skip; + } else if (type == TYPE_ONTEXTDATA) { + avpriv_request_sample(s, "OnTextData packet"); + return flv_data_packet(s, pkt, dts, next); } avio_seek(s->pb, meta_pos, SEEK_SET); } |