[MPlayer-dev-eng] [PATCH] bugfix for libmpdemux/demux_mf.c

Paul-Francois Fontigny pff at filmik.be
Tue Jul 25 23:29:50 CEST 2006


Hi,

On Tue, 2006-07-25 at 17:41 +0200, Guillaume POIRIER wrote:

> > This patch fix 3 bugs in libmpdemux/demux_mf.c
> >
> > 1. Relative seek is seeking 1 frame to far.
> > 2. Percent seek is seeking 1 frame to far (beyond EOF) at 100%.
> > 3. Check for EOF is cheking 1 frame to far.

> Paul-François, could you maybe provide the command-line and input
> files necessary to reproduce the problem you have addressed?

You'll need a sequence of images. If you have ImageMagick on your
system, this will do:

i=0
while [ $i -lt 250 ]
do
convert -verbose -size 720x576 pattern:gray0 \
-fill white -font Helvetica -pointsize 200 \
-annotate +75+350 $(printf %05d $i) \
+matte -type truecolor test.$(printf %05d $i).tga
i=$(($i+1))
done

Start mplayer in slave mode:

mplayer -slave mf://test.*.tga

Pause mplayer (spacebar)
In the console window enter the commands:
For bug #1:

pausing seek 1
pausing seek -1
pausing seek 1
pausing seek -1
...

Each time it is going 1 frame to far.
If you want to do it frame by frame (1sec / 25fps = .04)

pausing seek .04
pausing seek -.04
...

For bug #2:

pausing seek 100 1

Nothing happen. On the next thing you do mplayer exit.

For bug #3:

pausing seek 110 1

or

pausing seek 100000 2

Will behave the same way as bug #2.

A few more words:
Bug #1: I think the problem is that mf->curr_frame is already pointing
to the next frame to display when the loop in mplayer.c reach the
"key_events" module.

Bug #2&3: I didn't run into it. I figure it out reading the sources.

Thanks for taking care of my patch.

Paul-Francois Fontigny




More information about the MPlayer-dev-eng mailing list