mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Fix pts->dts conversion init for non-zero initial value for pts.
Patch by Daniel Kristjansson, danielk cuymedia net Originally committed as revision 22297 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4245c6ec4e
commit
663322c1b8
@ -2695,7 +2695,7 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){
|
||||
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]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user