Commit 9195c26d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/rv34: fix crash while seeking on very damaged file

Fixes null pointer dereference
Fixes Ticket2093
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0089fb79
......@@ -1685,7 +1685,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
/* first slice */
if (si.start == 0) {
if (s->mb_num_left > 0) {
if (s->mb_num_left > 0 && s->current_picture_ptr) {
av_log(avctx, AV_LOG_ERROR, "New frame but still %d MB left.\n",
s->mb_num_left);
ff_er_frame_end(&s->er);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment