avcodec/flacenc: Replace "return -1" by named constant
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 22 Sep 2017 23:44:27 +0000 (01:44 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 24 Sep 2017 00:33:48 +0000 (02:33 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/flacenc.c

index 3575f53..170c3ca 100644 (file)
@@ -268,7 +268,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
 
     /* find samplerate in table */
     if (freq < 1)
-        return -1;
+        return AVERROR(EINVAL);
     for (i = 4; i < 12; i++) {
         if (freq == ff_flac_sample_rate_table[i]) {
             s->samplerate = ff_flac_sample_rate_table[i];