[FFmpeg-devel] [PATCH] AU : demuxed packet size should be sample size aligned

Michael Niedermayer michaelni
Sun Dec 6 22:35:39 CET 2009


nOn Sun, Dec 06, 2009 at 11:26:58PM +0530, Jai Menon wrote:
> Hi,
> 
> As in subject.
> Fixes issue 1593.
> 
> -- 
> Jai Menon
> 

>  au.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> b6deb93d2a729411da7182658cfd362c573bfb29  audemux_fix.patch
> diff --git a/libavformat/au.c b/libavformat/au.c
> index 7f119e9..e4f5d9e 100644
> --- a/libavformat/au.c
> +++ b/libavformat/au.c
> @@ -157,14 +157,14 @@ static int au_read_header(AVFormatContext *s,
>      return 0;
>  }
>  
> -#define MAX_SIZE 4096
> +#define BLOCK_SIZE 2048
>  
>  static int au_read_packet(AVFormatContext *s,
>                            AVPacket *pkt)
>  {
>      int ret;
>  
> -    ret= av_get_packet(s->pb, pkt, MAX_SIZE);
> +    ret= av_get_packet(s->pb, pkt, BLOCK_SIZE*av_get_bits_per_sample(s->streams[0]->codec->codec_id)>>3);

i suspect this also needs to be multiplied by channels

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091206/de245294/attachment.pgp>



More information about the ffmpeg-devel mailing list