diff options
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]; |