flvdec: fix lack of duration for some files
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Fri, 5 Jun 2015 18:14:58 +0000 (14:14 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 5 Jun 2015 19:56:09 +0000 (21:56 +0200)
Fixes #4579

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/flvdec.c

index f4447b6..940d4dd 100644 (file)
@@ -847,7 +847,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
                 int type;
                 meta_pos = avio_tell(s->pb);
                 type = flv_read_metabody(s, next);
-                if (type == 0 && dts == 0 || type < 0) {
+                if (type == 0 && dts == 0 || type < 0 || type == TYPE_UNKNOWN) {
                     goto skip;
                 } else if (type == TYPE_ONTEXTDATA) {
                     avpriv_request_sample(s, "OnTextData packet");