[FFmpeg-cvslog] r12130 - trunk/ffmpeg.c

michael subversion
Sun Feb 17 18:41:33 CET 2008


Author: michael
Date: Sun Feb 17 18:41:32 2008
New Revision: 12130

Log:
Use next_pts if pkt->dts is unknown. In an ideal world this wouldnt be needed
but sadly there are cases where the timestamps cannot be found without decoding.


Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Sun Feb 17 18:41:32 2008
@@ -1066,7 +1066,7 @@ static int output_packet(AVInputStream *
     ptr = pkt->data;
     while (len > 0) {
     handle_eof:
-        if(!pkt || ptr != pkt->data){
+        if(!pkt || ptr != pkt->data || pkt->dts == AV_NOPTS_VALUE){
             ist->pts= ist->next_pts; // needed for last packet if vsync=0 and for multi pkt
         } else if (pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
             ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);




More information about the ffmpeg-cvslog mailing list