summaryrefslogtreecommitdiff
path: root/libavformat/au.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-01-30 22:10:33 +0000
committerPaul B Mahol <onemda@gmail.com>2013-01-30 22:17:52 +0000
commit10e4905dd9b741a109c26341e2e5850852518604 (patch)
tree9693146cad6838ab4c113ecf31c067d791d90f7d /libavformat/au.c
parent984add64a41c3296a8a82051cc90bff2eb449609 (diff)
auenc: remove put_au_header() and merge its code into au_write_header
Such level of abstraction is pointless. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/au.c')
-rw-r--r--libavformat/au.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/libavformat/au.c b/libavformat/au.c
index b3a793d7ff..f887162110 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -151,9 +151,11 @@ AVInputFormat ff_au_demuxer = {
#include "rawenc.h"
-/* AUDIO_FILE header */
-static int put_au_header(AVIOContext *pb, AVCodecContext *enc)
+static int au_write_header(AVFormatContext *s)
{
+ AVIOContext *pb = s->pb;
+ AVCodecContext *enc = s->streams[0]->codec;
+
if (!enc->codec_tag)
return AVERROR(EINVAL);
@@ -164,18 +166,6 @@ static int put_au_header(AVIOContext *pb, AVCodecContext *enc)
avio_wb32(pb, enc->sample_rate);
avio_wb32(pb, enc->channels);
avio_wb64(pb, 0); /* annotation field */
-
- return 0;
-}
-
-static int au_write_header(AVFormatContext *s)
-{
- AVIOContext *pb = s->pb;
- int ret;
-
- if ((ret = put_au_header(pb, s->streams[0]->codec)) < 0)
- return ret;
-
avio_flush(pb);
return 0;