diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-07 01:24:32 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-07 01:24:32 +0100 |
commit | 501db2f32babff8e2851ffd7aeb6bcb1ecb47d19 (patch) | |
tree | a911a0ca4813975ecc9baae4182b3fea8ef45944 /libavcodec/v210dec.c | |
parent | 4b20d307b32b3562b7cd595cd00dae30203a51fc (diff) | |
parent | 9dbbda235d93d628777b986e502213f1ed390973 (diff) | |
download | ffmpeg-501db2f32babff8e2851ffd7aeb6bcb1ecb47d19.tar.gz |
Merge commit '9dbbda235d93d628777b986e502213f1ed390973'
* commit '9dbbda235d93d628777b986e502213f1ed390973':
vb: return meaningful error codes.
ptx: return meaningful error codes.
tiff: return meaningful error codes.
vqavideo: return meaningful error codes.
mss2: return meaningful error codes.
v210dec: return meaningful error codes
indeo2: cosmetics, reformat
Conflicts:
libavcodec/indeo2.c
libavcodec/tiff.c
libavcodec/v210dec.c
libavcodec/vb.c
libavcodec/vqavideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/v210dec.c')
-rw-r--r-- | libavcodec/v210dec.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 63037adb8d..132b42ad97 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -55,7 +55,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (avctx->width & 1) { av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); - return -1; + return AVERROR_INVALIDDATA; } avctx->pix_fmt = AV_PIX_FMT_YUV422P10; avctx->bits_per_raw_sample = 10; @@ -77,7 +77,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, { V210DecContext *s = avctx->priv_data; - int h, w, stride, aligned_input; + int h, w, ret, stride, aligned_input; AVFrame *pic = avctx->coded_frame; const uint8_t *psrc = avpkt->data; uint16_t *y, *u, *v; @@ -97,7 +97,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, s->stride_warning_shown = 1; } else { av_log(avctx, AV_LOG_ERROR, "packet too small\n"); - return -1; + return AVERROR_INVALIDDATA; } } @@ -112,8 +112,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, avctx->release_buffer(avctx, pic); pic->reference = 0; - if (ff_get_buffer(avctx, pic) < 0) - return -1; + if ((ret = ff_get_buffer(avctx, pic)) < 0) + return ret; y = (uint16_t*)pic->data[0]; u = (uint16_t*)pic->data[1]; |