summaryrefslogtreecommitdiff
path: root/libavcodec/targa.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-14 15:04:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-14 15:04:58 +0100
commit8943925d1f68316218a9722c3f275ae1ae29b325 (patch)
tree455f017242d1ab01e0eb2e4ae981b79e986e2015 /libavcodec/targa.c
parent329675cfd71fab29e47ea9c64f3560f0305dbf36 (diff)
parent688b132b881d423877e38dc82f17e23a604be676 (diff)
downloadffmpeg-8943925d1f68316218a9722c3f275ae1ae29b325.tar.gz
Merge commit '688b132b881d423877e38dc82f17e23a604be676'
* commit '688b132b881d423877e38dc82f17e23a604be676': qdrw: return meaningful error codes. qtrle: return a meaningful error code. gifdec: return meaningful error codes. interplayvideo: remove a static variable. interplayvideo: return meaningful error codes. lcldec: return meaningful error codes. targa: return meaningful error codes. qpeg: return a meaningful error code. nuv: return meaningful error codes. Conflicts: libavcodec/gifdec.c libavcodec/interplayvideo.c libavcodec/nuv.c libavcodec/qpeg.c libavcodec/targa.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/targa.c')
-rw-r--r--libavcodec/targa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index 18ad21d036..11a8f213fd 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -178,7 +178,7 @@ static int decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
}
- if ((ret = av_image_check_size(w, h, 0, avctx)))
+ if ((ret = av_image_check_size(w, h, 0, avctx)) < 0)
return ret;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
@@ -200,6 +200,7 @@ static int decode_frame(AVCodecContext *avctx,
if (colors) {
int pal_size, pal_sample_size;
+
switch (csize) {
case 32: pal_sample_size = 4; break;
case 24: pal_sample_size = 3; break;