mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
openjpegdec: allow multithread decoding only in subframe mode
To avoid mis-ordered frames, allow multithread decoding only in subframe mode. Fixes #1786 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3948>
This commit is contained in:
parent
0bcc141b5e
commit
f3dfe7b125
1 changed files with 8 additions and 4 deletions
|
@ -217,10 +217,14 @@ gst_openjpeg_dec_start (GstVideoDecoder * decoder)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "Starting");
|
||||
self->available_threads = self->max_slice_threads;
|
||||
if (self->available_threads)
|
||||
self->decode_frame = gst_openjpeg_dec_decode_frame_multiple;
|
||||
else
|
||||
self->decode_frame = gst_openjpeg_dec_decode_frame_single;
|
||||
self->decode_frame = gst_openjpeg_dec_decode_frame_single;
|
||||
if (self->available_threads) {
|
||||
if (gst_video_decoder_get_subframe_mode (decoder))
|
||||
self->decode_frame = gst_openjpeg_dec_decode_frame_multiple;
|
||||
else
|
||||
GST_INFO_OBJECT (self,
|
||||
"Multiple threads decoding only available in subframe mode.");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue