mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +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/4275>
This commit is contained in:
parent
f6934e6de6
commit
73b16af81c
1 changed files with 8 additions and 4 deletions
|
@ -217,10 +217,14 @@ gst_openjpeg_dec_start (GstVideoDecoder * decoder)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Starting");
|
GST_DEBUG_OBJECT (self, "Starting");
|
||||||
self->available_threads = self->max_slice_threads;
|
self->available_threads = self->max_slice_threads;
|
||||||
if (self->available_threads)
|
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;
|
self->decode_frame = gst_openjpeg_dec_decode_frame_multiple;
|
||||||
else
|
else
|
||||||
self->decode_frame = gst_openjpeg_dec_decode_frame_single;
|
GST_INFO_OBJECT (self,
|
||||||
|
"Multiple threads decoding only available in subframe mode.");
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue