revert r8428, the check was not that useless
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 20 Mar 2007 13:59:59 +0000 (13:59 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 20 Mar 2007 13:59:59 +0000 (13:59 +0000)
should fix constant pts=0 with broken demuxers

Originally committed as revision 8454 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index b5893de..417e81c 100644 (file)
@@ -633,7 +633,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
             st->last_IP_pts= pkt->pts;
             /* cannot compute PTS if not present (we can compute it only
             by knowing the futur */
-        } else {
+        } else if(pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE || pkt->duration){
             if(pkt->pts != AV_NOPTS_VALUE && pkt->duration){
                 int64_t old_diff= FFABS(st->cur_dts - pkt->duration - pkt->pts);
                 int64_t new_diff= FFABS(st->cur_dts - pkt->pts);