[MPlayer-dev-eng] Possible bug when sample rate changes mid-stream
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Oct 15 20:45:46 CEST 2013
On Mon, Oct 07, 2013 at 08:53:33PM +0000, Paul Kelly wrote:
> Hello mplayer developers,
> I am experiencing a problem with mplayer when playing MP3 audio in
> which the sample rate changes during playback. The problem shows
> itself in particular with some internet radio stations which change
> from 22050 Hz to 44100 Hz mid-stream without any interruption -
> mplayer will play such a stream at half speed after the change.
>
> I have traced the problem to the setup_format() function in
> libmpcodecs/ad_ffmpeg.c: the FFmpeg/libavcodec MP3 decoder correctly
> detects the change in sample rate, but setup_format() then
> overwrites
> this changed value with an old value. This means that the change
> isn't detected, and the audio ends up being played at the wrong
> speed.
>
> The patch below fixes the problem for me, but I'm not sure what the
> intent of the line of code I've removed is, so I would appreciate
> somebody verifying if this is a good way of fixing the problem, or
> whether I should be looking somewhere else.
Should be kind of mostly fixed by r36465.
More information about the MPlayer-dev-eng
mailing list