summaryrefslogtreecommitdiff
path: root/libavcodec/vp56.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-12-14 08:22:06 +0100
committerLuca Barbato <lu_zero@gentoo.org>2012-12-14 13:21:59 +0100
commitbb675d3ac6d722d5e117ae9042a996b55ca05b1d (patch)
treed0b3297195aebe50bf9d192664969f5becb228bf /libavcodec/vp56.c
parentdeabb52ab4c1fdb3dd319f3980b1489a182011f1 (diff)
vp56: make parse_header return standard error codes
Returning 0 for failure is misleading. CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r--libavcodec/vp56.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 47fe2fb11c..6779ffb6dc 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -514,10 +514,10 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
s->modelp = &s->models[is_alpha];
res = s->parse_header(s, buf, remaining_buf_size, &golden_frame);
- if (!res)
- return -1;
+ if (res < 0)
+ return res;
- if (res == 2) {
+ if (res == VP56_SIZE_CHANGE) {
int i;
for (i = 0; i < 4; i++) {
if (s->frames[i].data[0])
@@ -536,7 +536,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(avctx)) {
avctx->release_buffer(avctx, p);
return -1;