[FFmpeg-cvslog] avcodec/flacenc: Replace "return -1" by named constant

Michael Niedermayer git at videolan.org
Sun Sep 24 03:36:53 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep 23 01:44:27 2017 +0200| [d8ef5a47bba85fa147ac53a9d9523b3eca031696] | committer: Michael Niedermayer

avcodec/flacenc: Replace "return -1" by named constant

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/flacenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 3575f5391d..170c3caf48 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -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];



More information about the ffmpeg-cvslog mailing list