diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-10-23 15:59:40 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-10-24 20:45:17 +0300 |
commit | f53525d248634b6a68f37baefc5028d364ba0bff (patch) | |
tree | 1de7b9f541e6e5b6ed24eb5f9a62da1f378a32ff /libavformat/aiffenc.c | |
parent | c36eae65e488d8b047d37aa157c3c3c033f6489d (diff) |
avformat/aiffenc: Use better error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/aiffenc.c')
-rw-r--r-- | libavformat/aiffenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c index d09c9afb95..d37b9ae1c6 100644 --- a/libavformat/aiffenc.c +++ b/libavformat/aiffenc.c @@ -122,7 +122,7 @@ static int aiff_write_header(AVFormatContext *s) /* First verify if format is ok */ if (!par->codec_tag) - return -1; + return AVERROR(EINVAL); if (par->codec_tag != MKTAG('N','O','N','E')) aifc = 1; @@ -135,7 +135,7 @@ static int aiff_write_header(AVFormatContext *s) if (aifc) { // compressed audio if (!par->block_align) { av_log(s, AV_LOG_ERROR, "block align not set\n"); - return -1; + return AVERROR(EINVAL); } /* Version chunk */ ffio_wfourcc(pb, "FVER"); @@ -166,7 +166,7 @@ static int aiff_write_header(AVFormatContext *s) par->bits_per_coded_sample = av_get_bits_per_sample(par->codec_id); if (!par->bits_per_coded_sample) { av_log(s, AV_LOG_ERROR, "could not compute bits per sample\n"); - return -1; + return AVERROR(EINVAL); } if (!par->block_align) par->block_align = (par->bits_per_coded_sample * par->channels) >> 3; |