diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-11-14 12:30:35 +0100 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-11-14 12:30:35 +0100 |
commit | bebab21176c1f052f748cfb2384cc01e0bdb13f4 (patch) | |
tree | 63977edea15a1bd50f3a90e7d0d4ea64da465ecf | |
parent | bbd0ebfd835761d1abbe030a8a7866d88b2a8777 (diff) | |
parent | 9f732e4c996243c1e57c2bbbec6c8b94c37a7a22 (diff) | |
download | ffmpeg-bebab21176c1f052f748cfb2384cc01e0bdb13f4.tar.gz |
Merge commit '9f732e4c996243c1e57c2bbbec6c8b94c37a7a22'
* commit '9f732e4c996243c1e57c2bbbec6c8b94c37a7a22':
tiffenc: Check av_pix_fmt_desc_get() return value
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
-rw-r--r-- | libavcodec/tiffenc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 3d37d2e084..e575c4c9a0 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -265,6 +265,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->subsampling[0] = 1; s->subsampling[1] = 1; + if (!desc) + return AVERROR(EINVAL); + avctx->bits_per_coded_sample = s->bpp = av_get_bits_per_pixel(desc); s->bpp_tab_size = desc->nb_components; |