aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/qdrw.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/qdrw.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/qdrw.c')
-rw-r--r--libavcodec/qdrw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 2be6e04b64..71fe48aea6 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -45,7 +45,7 @@ static int decode_frame(AVCodecContext *avctx,
AVFrame * const p = &a->pic;
uint8_t* outdata;
int colors;
- int i;
+ int i, ret;
uint32_t *pal;
int r, g, b;
@@ -53,9 +53,9 @@ static int decode_frame(AVCodecContext *avctx,
avctx->release_buffer(avctx, p);
p->reference= 0;
- if(ff_get_buffer(avctx, p) < 0){
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
- return -1;
+ return ret;
}
p->pict_type= AV_PICTURE_TYPE_I;
p->key_frame= 1;
@@ -70,7 +70,7 @@ static int decode_frame(AVCodecContext *avctx,
if(colors < 0 || colors > 256) {
av_log(avctx, AV_LOG_ERROR, "Error color count - %i(0x%X)\n", colors, colors);
- return -1;
+ return AVERROR_INVALIDDATA;
}
if (buf_end - buf < (colors + 1) * 8)
return AVERROR_INVALIDDATA;