aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rawdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-28 04:12:24 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-28 04:12:24 +0200
commit7b453d1c60005cd1e0461a8d06d07e89116772d4 (patch)
tree55f5b363a0f6b5f447026edb8e80b38ef8c22437 /libavcodec/rawdec.c
parent4a619fcae99c7fc8cae7070c7859243c40cdb4bc (diff)
parent55abaa58e5ede59d497e1ab89d5fe0950d1c6ecf (diff)
downloadffmpeg-7b453d1c60005cd1e0461a8d06d07e89116772d4.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: westwood_vqa: fix SND0 chunk handling westwood_vqa: set video stream duration raw: forward avpicture_fill() error code in raw_decode(). build: Do not explicitly add the doc directory to the OBJDIRS list. dv: Split off DV video decoder into its own file. build: fix RALF decoder standalone compilation, which depends on Golomb code configure: Drop stray duplicate entry for --disable-fft from help output. Conflicts: libavcodec/dv.c libavcodec/rawdec.c libavformat/westwood_vqa.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r--libavcodec/rawdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index f27df2ad2d..65593e809f 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -139,6 +139,7 @@ static int raw_decode(AVCodecContext *avctx,
int buf_size = avpkt->size;
int linesize_align = 4;
RawVideoContext *context = avctx->priv_data;
+ int res;
AVFrame *frame = data;
AVPicture *picture = data;
@@ -190,7 +191,9 @@ static int raw_decode(AVCodecContext *avctx,
if(buf_size < context->length - (avctx->pix_fmt==PIX_FMT_PAL8 ? 256*4 : 0))
return -1;
- avpicture_fill(picture, buf, avctx->pix_fmt, avctx->width, avctx->height);
+ if ((res = avpicture_fill(picture, buf, avctx->pix_fmt,
+ avctx->width, avctx->height)) < 0)
+ return res;
if((avctx->pix_fmt==PIX_FMT_PAL8 && buf_size < context->length) ||
(av_pix_fmt_descriptors[avctx->pix_fmt].flags & PIX_FMT_PSEUDOPAL)) {
frame->data[1]= context->palette;