aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-28 02:42:39 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-10-01 01:11:45 +0200
commit9e9d731b510666edac3a2b450dfc331279db818b (patch)
tree79851eefbfe0153894565236adf11defc74801a8
parentdabea74d0e82ea80cd344f630497cafcb3ef872c (diff)
downloadffmpeg-9e9d731b510666edac3a2b450dfc331279db818b.tar.gz
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>
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 1b47b18361..bd84ee994f 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -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;
}