[FFmpeg-cvslog] r12797 - trunk/libavformat/utils.c

reimar subversion
Sun Apr 13 10:55:02 CEST 2008


Author: reimar
Date: Sun Apr 13 10:55:02 2008
New Revision: 12797

Log:
Do not call update_initial_durations if pkt->duration is 0.
Fixes and assertion crash when playing amv files, e.g.
http://samples.mplayerhq.hu/amv/Shakira - Hips Don't Lie.amv


Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Sun Apr 13 10:55:02 2008
@@ -668,7 +668,7 @@ static void compute_pkt_fields(AVFormatC
         if (den && num) {
             pkt->duration = av_rescale(1, num * (int64_t)st->time_base.den, den * (int64_t)st->time_base.num);
 
-            if(st->cur_dts == 0)
+            if(st->cur_dts == 0 && pkt->duration != 0)
                 update_initial_durations(s, st, pkt);
         }
     }




More information about the ffmpeg-cvslog mailing list