[MPlayer-dev-eng] [patch] fix SPDIF output on Mac

Hermi Mercury hermi.hg at gmail.com
Wed Sep 28 22:26:10 CEST 2011


> That seems overcomplicated, why not just:
> Index: ao_coreaudio.c
> ===================================================================
> --- ao_coreaudio.c      (revision 34128)
> +++ ao_coreaudio.c      (working copy)
> @@ -133,7 +133,10 @@
>  static int read_buffer(unsigned char* data,int len){
>   int buffered = av_fifo_size(ao->buffer);
>   if (len > buffered) len = buffered;
> +  if (data)
>   av_fifo_generic_read(ao->buffer, data, len, NULL);
> +  else
> +    av_fifo_drain(ao->buffer, len);
>   return len;
>  }
>

This shorter patch works.  I thought this might cause a problem if
attempting to remove too much from the buffer, but I haven't encountered it.


More information about the MPlayer-dev-eng mailing list