avcodec/vp3: Do not return random positive values but the buf size

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/230/merge
Michael Niedermayer 8 years ago
parent 13332504c9
commit d8094a303b
  1. 6
      libavcodec/vp3.c

@ -2022,8 +2022,9 @@ static int vp3_decode_frame(AVCodecContext *avctx,
ret = vp3_decode_init(avctx);
if (ret < 0) {
vp3_decode_end(avctx);
}
return ret;
}
return buf_size;
} else if (type == 2) {
vp3_decode_end(avctx);
ret = theora_decode_tables(avctx, &gb);
@ -2031,9 +2032,10 @@ static int vp3_decode_frame(AVCodecContext *avctx,
ret = vp3_decode_init(avctx);
if (ret < 0) {
vp3_decode_end(avctx);
}
return ret;
}
return buf_size;
}
av_log(avctx, AV_LOG_ERROR,
"Header packet passed to frame decoder, skipping\n");

Loading…
Cancel
Save