diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-09 08:48:43 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-01-13 00:16:40 +0100 |
commit | b82170336f90d06c645d8252ddeccfc92c2f9ccb (patch) | |
tree | df3ecc8015005cc110a6bed59747bd4454f54692 /libavcodec/tiffenc.c | |
parent | 12e1a7013a53ad957c4ff11a3aebc0763024d24b (diff) | |
download | ffmpeg-b82170336f90d06c645d8252ddeccfc92c2f9ccb.tar.gz |
tiffenc: initialize return value
'ret' can only be used without initialization if s->height <= 0, which can
only happen if avctx->height <= 0, which is validated elsewhere. Doesn't hurt
to still initialize it though.
CC: libav-stable@libav.org
Bug-Id: CID 732296
(cherry picked from commit 0562887a984388fdc7a9b71c9374ff9c756fb4f1)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/tiffenc.c')
-rw-r--r-- | libavcodec/tiffenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 5d410b19e9..6c2cde92e2 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -231,7 +231,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, int bytes_per_row; uint32_t res[2] = { 72, 1 }; // image resolution (72/1) uint16_t bpp_tab[] = { 8, 8, 8, 8 }; - int ret; + int ret = 0; int is_yuv = 0; uint8_t *yuv_line = NULL; int shift_h, shift_v; |