From: Di Wu <di1028...@samsung.com> Multi-thread decoding doesn't work when refreshctx is equal to 0. Fix it by call ff_thread_finish_setup function in the condition when refreshctx is equal to 0.
In vp9_decode_frame function, ff_thread_finish_setup is not called when refreshctx is equal to 0. The next decoding thread can not start work until the cunrrent frame has been decoded completely. So multi-thread decoding in frame level is not enabled when refreshctx is equal to 0. Signed-off-by: Di Wu <di1028...@samsung.com> --- libavcodec/vp9.c | 3 +++ 1 file changed, 3 insertions(+) mode change 100644 => 100755 libavcodec/vp9.c diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c old mode 100644 new mode 100755 index 31725e6..364b36a --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -3799,6 +3799,9 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame, "Failed to allocate block buffers\n"); return res; } + if (!s->refreshctx){ + ff_thread_finish_setup(ctx); + } if (s->refreshctx && s->parallelmode) { int j, k, l, m; -- 1.7.9.5 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel