avformat/wavenc: more specific error return for "Writing 16 bit peak for 8 bit audio"
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Jun 2014 11:50:38 +0000 (13:50 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Jun 2014 11:50:38 +0000 (13:50 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/wavenc.c

index b782d8c..57d626f 100644 (file)
@@ -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));