diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-10 12:26:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-10 12:27:16 +0100 |
commit | 65b8527993a1737eccc2820f27ed6bf10b63af5f (patch) | |
tree | fcb0260594c58c9bb05d5a4e6a9294b6e38184bd /libavformat/au.c | |
parent | 8c7de73e20ebd0435f7ddd75d57ffb7179c40b77 (diff) | |
parent | f7bf72a4a1146a7583577c9bdc066767e1ba3c6a (diff) | |
download | ffmpeg-65b8527993a1737eccc2820f27ed6bf10b63af5f.tar.gz |
Merge commit 'f7bf72a4a1146a7583577c9bdc066767e1ba3c6a'
* commit 'f7bf72a4a1146a7583577c9bdc066767e1ba3c6a':
idcinvideo: correctly set AVFrame defaults
yadif: Port inline assembly to yasm
au: remove unnecessary casts
au: return AVERROR codes instead of -1
Conflicts:
libavcodec/idcinvideo.c
libavfilter/x86/yadif_template.c
libavformat/au.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/au.c')
-rw-r--r-- | libavformat/au.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavformat/au.c b/libavformat/au.c index 1fdaa9a822..c190d57f61 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -170,14 +170,14 @@ AVInputFormat ff_au_demuxer = { static int put_au_header(AVIOContext *pb, AVCodecContext *enc) { if (!enc->codec_tag) - return -1; + return AVERROR(EINVAL); ffio_wfourcc(pb, ".snd"); /* magic number */ avio_wb32(pb, AU_HEADER_SIZE); /* header size */ avio_wb32(pb, AU_UNKNOWN_SIZE); /* data size */ - avio_wb32(pb, (uint32_t)enc->codec_tag); /* codec ID */ + avio_wb32(pb, enc->codec_tag); /* codec ID */ avio_wb32(pb, enc->sample_rate); - avio_wb32(pb, (uint32_t)enc->channels); + avio_wb32(pb, enc->channels); avio_wb64(pb, 0); /* annotation field */ return 0; @@ -186,9 +186,10 @@ static int put_au_header(AVIOContext *pb, AVCodecContext *enc) static int au_write_header(AVFormatContext *s) { AVIOContext *pb = s->pb; + int ret; - if (put_au_header(pb, s->streams[0]->codec) < 0) - return AVERROR(EINVAL); + if ((ret = put_au_header(pb, s->streams[0]->codec)) < 0) + return ret; avio_flush(pb); |