# HG changeset patch # User arpi # Date 1004393500 0 # Node ID 89e3bf3c0c4e0c40fb23c076deb7b52d9c1dcaa1 # Parent fd48f0d813b6afb0ef21fdc632b81cb07cebf236 seek ebfore begin of the movie fixed diff -r fd48f0d813b6 -r 89e3bf3c0c4e libmpdemux/demux_mov.c --- 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->poschunks_size && trak->chunks[trak->pos].samplepos; 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->possamples_size;++trak->pos){ if(trak->samples[trak->pos].pts>=ipts) break; // found it! }