Commit 9e9d731b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/pngdec: mark previous_picture as done on end of decode_frame_common()

Fixes deadlock with threads

Found-by: Paul B Mahol
Reviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent dabea74d
......@@ -1217,6 +1217,7 @@ exit_loop:
}
}
ff_thread_report_progress(&s->picture, INT_MAX, 0);
ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
av_frame_set_metadata(p, metadata);
metadata = NULL;
......@@ -1225,6 +1226,7 @@ exit_loop:
fail:
av_dict_free(&metadata);
ff_thread_report_progress(&s->picture, INT_MAX, 0);
ff_thread_report_progress(&s->previous_picture, INT_MAX, 0);
return ret;
}
......
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