[MPlayer-cvslog] r19185 - trunk/libmpdemux/demux_mf.c
gpoirier
subversion at mplayerhq.hu
Wed Jul 26 11:30:44 CEST 2006
Author: gpoirier
Date: Wed Jul 26 11:30:43 2006
New Revision: 19185
Modified:
trunk/libmpdemux/demux_mf.c
Log:
fix 3 bugs in libmpdemux/demux_mf.c
1. Relative seek is seeking 1 frame too far.
2. Percent seek is seeking 1 frame too far (beyond EOF) at 100%.
3. Check for EOF is checking 1 frame too far.
Patch by Paul-Francois Fontigny < pff AAA filmik PPP be>
Original thread:
Date: Jul 16, 2006 12:40 PM
Subject: [MPlayer-dev-eng] [PATCH] bugfix for libmpdemux/demux_mf.c
Modified: trunk/libmpdemux/demux_mf.c
==============================================================================
--- trunk/libmpdemux/demux_mf.c (original)
+++ trunk/libmpdemux/demux_mf.c Wed Jul 26 11:30:43 2006
@@ -18,12 +18,12 @@
static void demux_seek_mf(demuxer_t *demuxer,float rel_seek_secs,float audio_delay,int flags){
mf_t * mf = (mf_t *)demuxer->priv;
sh_video_t * sh_video = demuxer->video->sh;
- int newpos = (flags & 1)?0:mf->curr_frame;
+ int newpos = (flags & 1)?0:mf->curr_frame - 1;
- if ( flags & 2 ) newpos+=rel_seek_secs*mf->nr_of_files;
+ if ( flags & 2 ) newpos+=rel_seek_secs*(mf->nr_of_files - 1);
else newpos+=rel_seek_secs * sh_video->fps;
if ( newpos < 0 ) newpos=0;
- if( newpos > mf->nr_of_files) newpos=mf->nr_of_files;
+ if( newpos >= mf->nr_of_files) newpos=mf->nr_of_files - 1;
mf->curr_frame=newpos;
}
More information about the MPlayer-cvslog
mailing list