]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/au.c
Add support for mp3 over RTP in rtpdec.c
[ffmpeg] / libavformat / au.c
index 24bdb62c7c9740bd6b2f80fccf102ea277ee703b..0ea0ea8c981ac28ca1c778ae3d6adc4a06352c47 100644 (file)
@@ -44,7 +44,7 @@ static const AVCodecTag codec_au_tags[] = {
     { CODEC_ID_PCM_F32BE, 6 },
     { CODEC_ID_PCM_F64BE, 7 },
     { CODEC_ID_PCM_ALAW, 27 },
-    { 0, 0 },
+    { CODEC_ID_NONE, 0 },
 };
 
 #if CONFIG_AU_MUXER
@@ -157,14 +157,16 @@ static int au_read_header(AVFormatContext *s,
     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;