diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-15 13:41:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-15 13:41:06 +0100 |
commit | f186ecc164e8dad145d4637ac1d55b66e460af7a (patch) | |
tree | b14e6d2d85dd3589c4a4cc5bb5c730976d9df854 /libavcodec/vp56.c | |
parent | 75b7e543df05e9d4dfb1f73a28bceecd0bd1971b (diff) | |
parent | bb675d3ac6d722d5e117ae9042a996b55ca05b1d (diff) | |
download | ffmpeg-f186ecc164e8dad145d4637ac1d55b66e460af7a.tar.gz |
Merge commit 'bb675d3ac6d722d5e117ae9042a996b55ca05b1d'
* commit 'bb675d3ac6d722d5e117ae9042a996b55ca05b1d':
vp56: make parse_header return standard error codes
Conflicts:
libavcodec/vp56.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r-- | libavcodec/vp56.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index adde128a62..ca1c8f1115 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -524,10 +524,10 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } res = s->parse_header(s, buf, remaining_buf_size); - if (!res) - return -1; + if (res < 0) + return res; - if (res == 2) { + if (res == VP56_SIZE_CHANGE) { for (i = 0; i < 4; i++) { if (s->frames[i].data[0]) avctx->release_buffer(avctx, &s->frames[i]); @@ -540,7 +540,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, return -1; } - if (res == 2) { + if (res == VP56_SIZE_CHANGE) { if (vp56_size_changed(s)) { avctx->release_buffer(avctx, p); return -1; @@ -556,8 +556,8 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, remaining_buf_size -= alpha_offset; res = s->alpha_context->parse_header(s->alpha_context, buf, remaining_buf_size); - if (res != 1) { - if(res==2) { + if (res != 0) { + if(res==VP56_SIZE_CHANGE) { av_log(avctx, AV_LOG_ERROR, "Alpha reconfiguration\n"); avctx->width = bak_w; avctx->height = bak_h; |