summaryrefslogtreecommitdiff
path: root/libavformat/au.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-12-19 20:16:35 +0000
committerPaul B Mahol <onemda@gmail.com>2012-12-19 20:16:35 +0000
commit76877beadac9179e640a582fdbfd540b23f536c7 (patch)
tree06764d7114e17aa06c60518a4721e05bae5d5883 /libavformat/au.c
parenta1d14336d31c76e3a7f86a10d2ac66a51e32652e (diff)
au: return meaningful error codes
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/au.c')
-rw-r--r--libavformat/au.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/au.c b/libavformat/au.c
index 0bf935469d..55a32388ab 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -76,7 +76,7 @@ static int au_read_header(AVFormatContext *s)
/* check ".snd" header */
tag = avio_rl32(pb);
if (tag != MKTAG('.', 's', 'n', 'd'))
- return -1;
+ return AVERROR_INVALIDDATA;
size = avio_rb32(pb); /* header size */
data_size = avio_rb32(pb); /* data size in bytes */
@@ -109,7 +109,7 @@ static int au_read_header(AVFormatContext *s)
/* now we are ready: build format streams */
st = avformat_new_stream(s, NULL);
if (!st)
- return -1;
+ return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_tag = id;
st->codec->codec_id = codec;
@@ -156,7 +156,7 @@ static int au_write_header(AVFormatContext *s)
/* format header */
if (put_au_header(pb, s->streams[0]->codec) < 0) {
- return -1;
+ return AVERROR(EINVAL);
}
avio_flush(pb);