[MPlayer-dev-eng] [PATCH] Playing final chunk of audio

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Oct 17 19:41:31 CEST 2010


On Sun, Oct 17, 2010 at 05:35:39PM +0200, Marek Dopiera wrote:
> On Sunday 17 October 2010 15:27:26 Reimar Döffinger wrote:
> > ignored. Below patch should work:
> > Index: libao2/ao_sun.c
> > ===================================================================
> > --- libao2/ao_sun.c     (revision 32499)
> > +++ libao2/ao_sun.c     (working copy)
> > @@ -665,9 +665,11 @@
> >  // it should round it down to outburst*n
> >  // return: number of bytes played
> >  static int play(void* data,int len,int flags){
> > -    if (len < ao_data.outburst) return 0;
> > +    if (!(flags & AOPLAY_FINAL_CHUNK)) {
> >      len /= ao_data.outburst;
> >      len *= ao_data.outburst;
> > +    }
> > +    if (len <= 0) return 0;
> >
> >      len = write(audio_fd, data, len);
> >      if(len > 0) {
> >
> 
> Yes, you're right, I agree its much better that way and it does work indeed. 
> I'd be grateful if you committed that.

Done, thanks for the report.


More information about the MPlayer-dev-eng mailing list