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

Dan Oscarsson Dan.Oscarsson at tieto.com
Mon Jan 24 20:38:54 CET 2011


mån 2011-01-24 klockan 19:21 +0100 skrev Reimar Döffinger:
> On Sun, Jan 23, 2011 at 09:02:58PM +0100, Dan Oscarsson wrote:
> > sön 2011-01-23 klockan 20:17 +0100 skrev Reimar Döffinger:
> > 
> > As part of my patches for new a-v sync handling (of which I have only
> > yet tried to get the first part accepted) I also had problem with audio
> > data being lost when speed was changed. I traced this to
> > 
> >  sh_audio->a_out_buffer_len = 0;
> > 
> > in init_audio_filters of libmpcodecs/dec_audio.c.
> > 
> > That line deletes any decoded audio in buffer which can result in audio
> > being lost when filters are changed. I have had that line commented out
> > for over a year with no bad effects.
> 
> I think you didn't test enough in that case.
> It should break horribly if number of channels or sample format changes.
> Any left-over data will be interpreted as in the new format.
> Testing with adding/removing a -af format filter might be able to test this.

I assume if you change number of channels or format you have to
reconfigure audio out too?

I have only studied the case when you change speed, and in that case you
must preserve the decoded audio data in the out buffer - otherwise some
audio is lost and audio gets out of sync with video.

   Dan



More information about the MPlayer-dev-eng mailing list