[FFmpeg-cvslog] r22297 - trunk/libavformat/utils.c
cehoyos
subversion
Mon Mar 8 00:10:19 CET 2010
Author: cehoyos
Date: Mon Mar 8 00:10:18 2010
New Revision: 22297
Log:
Fix pts->dts conversion init for non-zero initial value for pts.
Patch by Daniel Kristjansson, danielk cuymedia net
Modified:
trunk/libavformat/utils.c
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c Sun Mar 7 23:42:11 2010 (r22296)
+++ trunk/libavformat/utils.c Mon Mar 8 00:10:18 2010 (r22297)
@@ -2695,7 +2695,7 @@ static int compute_pkt_fields2(AVFormatC
if(pkt->pts != AV_NOPTS_VALUE && pkt->dts == AV_NOPTS_VALUE && delay <= MAX_REORDER_DELAY){
st->pts_buffer[0]= pkt->pts;
for(i=1; i<delay+1 && st->pts_buffer[i] == AV_NOPTS_VALUE; i++)
- st->pts_buffer[i]= (i-delay-1) * pkt->duration;
+ st->pts_buffer[i]= pkt->pts + (i-delay-1) * pkt->duration;
for(i=0; i<delay && st->pts_buffer[i] > st->pts_buffer[i+1]; i++)
FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);
More information about the ffmpeg-cvslog
mailing list