[FFmpeg-cvslog] r20758 - trunk/libavformat/au.c

jai_menon subversion
Mon Dec 7 14:55:38 CET 2009


Author: jai_menon
Date: Mon Dec  7 14:55:38 2009
New Revision: 20758

Log:
AU : demuxed packet size should be sample size aligned.
Fixes issue 1593.

Modified:
   trunk/libavformat/au.c

Modified: trunk/libavformat/au.c
==============================================================================
--- trunk/libavformat/au.c	Mon Dec  7 01:35:38 2009	(r20757)
+++ trunk/libavformat/au.c	Mon Dec  7 14:55:38 2009	(r20758)
@@ -157,14 +157,16 @@ static int au_read_header(AVFormatContex
     return 0;
 }
 
-#define MAX_SIZE 4096
+#define BLOCK_SIZE 1024
 
 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 *
+                       s->streams[0]->codec->channels *
+                       av_get_bits_per_sample(s->streams[0]->codec->codec_id) >> 3);
     if (ret < 0)
         return ret;
     pkt->stream_index = 0;



More information about the ffmpeg-cvslog mailing list