[FFmpeg-cvslog] avformat/wavenc: more specific error return for " Writing 16 bit peak for 8 bit audio"

Michael Niedermayer git at videolan.org
Tue Jun 24 13:59:01 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun 24 13:50:38 2014 +0200| [3bd0221bc1a0b22b190d08758d128eb18c765aaf] | committer: Michael Niedermayer

avformat/wavenc: more specific error return for "Writing 16 bit peak for 8 bit audio"

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3bd0221bc1a0b22b190d08758d128eb18c765aaf
---

 libavformat/wavenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/wavenc.c b/libavformat/wavenc.c
index b782d8c..57d626f 100644
--- a/libavformat/wavenc.c
+++ b/libavformat/wavenc.c
@@ -170,7 +170,7 @@ static av_cold int peak_init_writer(AVFormatContext *s)
     if (wav->peak_bps == 1 && wav->peak_format == PEAK_FORMAT_UINT16) {
         av_log(s, AV_LOG_ERROR,
                "Writing 16 bit peak for 8 bit audio does not make sense\n");
-        return -1;
+        return AVERROR(EINVAL);
     }
 
     wav->peak_maxpos = av_mallocz(enc->channels * sizeof(*wav->peak_maxpos));



More information about the ffmpeg-cvslog mailing list