lavf: do not use the parser duration for video
authorAnton Khirnov <anton@khirnov.net>
Sun, 13 Apr 2014 05:05:27 +0000 (07:05 +0200)
committerAnton Khirnov <anton@khirnov.net>
Tue, 22 Apr 2014 05:46:03 +0000 (07:46 +0200)
The parser has no way of knowing video duration, and therefore no video
parsers set it.

libavformat/utils.c

index 164cdd7..e35c1e4 100644 (file)
@@ -956,12 +956,6 @@ static int parse_packet(AVFormatContext *s, AVPacket *pkt, int stream_index)
                                      st->time_base,
                                      AV_ROUND_DOWN);
             }
-        } else if (st->codec->time_base.num != 0 &&
-                   st->codec->time_base.den != 0) {
-            out_pkt.duration = av_rescale_q_rnd(st->parser->duration,
-                                                st->codec->time_base,
-                                                st->time_base,
-                                                AV_ROUND_DOWN);
         }
 
         out_pkt.stream_index = st->index;