[vlc-commits] transcode: fix dec->fmt_out thread safety
Thomas Guillem
git at videolan.org
Tue Jan 2 16:02:43 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Dec 21 15:45:56 2017 +0100| [eef68d11047a598a4070753aae9206e7d1492f16] | committer: Thomas Guillem
transcode: fix dec->fmt_out thread safety
dec->fmt_out can be written from any thread by the decoder module. It's only
safe to access it without any lock from the pf_vout_format_update() callback.
In order to fetch the last video_format_t from the decoder, we use the one from
decoded pictures (that are created from dec->fmt_out.video from the same thread
than pf_vout_format_update()).
Note for conversion_video_filter_append():
We feed to the video converter chain a new fmt created from the pic
video_format_t instead of the original dec->fmt_out. Normally, video filters
only use fmt*.video
(cherry picked from commit 3140efd2ed0601e4d0d548faf8780aeca616ea7d)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=eef68d11047a598a4070753aae9206e7d1492f16
---
modules/stream_out/transcode/transcode.h | 1 +
modules/stream_out/transcode/video.c | 113 +++++++++++++++++--------------
2 files changed, 62 insertions(+), 52 deletions(-)
Diff: http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commitdiff;h=eef68d11047a598a4070753aae9206e7d1492f16
More information about the vlc-commits
mailing list