[FFmpeg-cvslog] lavc/decode: Initialize return value for get_format() failure.
Carl Eugen Hoyos
git at videolan.org
Mon Dec 10 02:50:28 EET 2018
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Thu Dec 6 23:17:13 2018 +0100| [9bcd40c29804787ef520fe9036ed87ff668ffe5d] | committer: Carl Eugen Hoyos
lavc/decode: Initialize return value for get_format() failure.
Silences a warning:
libavcodec/decode.c:1378:13: warning: variable 'ret' is used uninitialized whenever 'if' condition is true
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9bcd40c29804787ef520fe9036ed87ff668ffe5d
---
libavcodec/decode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index c89c77c43a..a32ff2fcd3 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -1378,6 +1378,7 @@ int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
if (i == n) {
av_log(avctx, AV_LOG_ERROR, "Invalid return from get_format(): "
"%s not in possible list.\n", desc->name);
+ ret = AV_PIX_FMT_NONE;
break;
}
More information about the ffmpeg-cvslog
mailing list