Mercurial > mplayer.hg
changeset 2545:89e3bf3c0c4e
seek ebfore begin of the movie fixed
author | arpi |
---|---|
date | Mon, 29 Oct 2001 22:11:40 +0000 |
parents | fd48f0d813b6 |
children | c9485365537d |
files | libmpdemux/demux_mov.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_mov.c Mon Oct 29 21:55:07 2001 +0000 +++ b/libmpdemux/demux_mov.c Mon Oct 29 22:11:40 2001 +0000 @@ -747,9 +747,11 @@ while(trak->pos<trak->chunks_size && trak->chunks[trak->pos].sample<sample) ++trak->pos; pts=(float)(trak->chunks[trak->pos].sample*trak->duration)/(float)trak->timescale; } else { - unsigned int ipts=pts; -// printf("MOV track seek - sample: %d \n",ipts); - if(!(flags&1)) ipts+=trak->samples[trak->pos].pts; + unsigned int ipts; + if(!(flags&1)) pts+=trak->samples[trak->pos].pts; + if(pts<0) pts=0; + ipts=pts; + //printf("MOV track seek - sample: %d \n",ipts); for(trak->pos=0;trak->pos<trak->samples_size;++trak->pos){ if(trak->samples[trak->pos].pts>=ipts) break; // found it! }