Mercurial > libavformat.hg
changeset 5769:faa085c983d5 libavformat
Fix pts->dts conversion init for non-zero initial value for pts.
Patch by Daniel Kristjansson, danielk cuymedia net
author | cehoyos |
---|---|
date | Sun, 07 Mar 2010 23:10:18 +0000 |
parents | b9c18d4872a2 |
children | 20ed96c29062 |
files | utils.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.c Sun Mar 07 22:42:11 2010 +0000 +++ b/utils.c Sun Mar 07 23:10:18 2010 +0000 @@ -2695,7 +2695,7 @@ 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]);