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

Fixes deadlock with threads

Found-by: Paul B Mahol
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-09-28 02:42:39 +02:00
parent dabea74d0e
commit 9e9d731b51
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}