}
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]);
return -1;
}
- if (res == 2) {
+ if (res == VP56_SIZE_CHANGE) {
if (vp56_size_changed(s)) {
avctx->release_buffer(avctx, p);
return -1;
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;