[MPlayer-dev-eng] [PATCH] Bug fix in af_add/del/switch/clr

Jehan Pagès jehan.marmottard at gmail.com
Sun Jan 23 02:46:45 CET 2011


ping.

I know everybody on the list is often busy and sometimes some email
passes under the radar, so I allow myself to remind you I posted a
patch.
I think the bug is straightforward to test with the procedure I gave,
and the fix as well with the (very simple) patch I joined.
Thanks.

Jehan

2011/1/19 Jehan Pagès <jehan.marmottard at gmail.com>:
> Hi,
>
> I have been recently noticed by a user of a bug with audio filter
> loading-on-the-run commands. Some audio frames were lost, which was
> unnoticed when used punctually, but when loading/reloading/clearing a
> lot filters in some time span, more frames lost became noticeable,
> hence speed was accelerating. And consequently some videos were not
> resyncing well, so images and audios got desynchronized.
>
> Though it seems unlikely to load filters every few milliseconds to
> notice this, the user who reported the bug used an audio equalizer
> filter reloading. I guess such an equalizer could be very often
> reloaded by a mplayer GUI while a user is trying to find the right
> values to apply to each frequency band (I guess this person was indeed
> developping some GUI to mplayer). And he wants to do this without
> music speeding or video desyncing. And anyway that's a bug, so it is
> good to fix. :-)
> After test, the problem occurred with any audio filter anyway.
>
> -------------------
> To reproduce:
>
> $ mkinfo /tmp/fifompdev
> $ mplayer  -slave -input file=/tmp/fifompdev <your_media_file>
> $ while true ; do echo af_switch equalizer=0:0:0:0:0:0:0:0:1:1
>>/tmp/fifompdev; sleep 0.1; done
>
> What happens and should not: in an audio file, the music will
> accelerate. In a video file, audio and video may desync.
> -------------------
>
> Basically to fix, I removed calls to reinit_audio_chain(); after such
> a dynamic load/unload of a filter. This was causing the issue and this
> was an unecessary call actually as any sound reinitialization was
> already dealed with in the functions which actually loaded/unloaded
> audio filters.
>
> Attached is the small patch file.
> You can try the bug reproduction before and after, and confirms it has
> been fixed (I confirmed it on my machine and the user who reported me
> the bug also did for him).
> Thanks.
>
> Jehan
>


More information about the MPlayer-dev-eng mailing list