mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
avviddec: Unlock video decoder stream lock temporarily while finishing frames
Temporarily release the video decoder stream lock so that other threads can continue decoding (e.g. call get_frame()) while data is being pushed downstream. At this point it is locked twice, we release one, and then the base class releases the last one just before pushing the data. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7576>
This commit is contained in:
parent
bbd3d6f4f6
commit
90728a1166
1 changed files with 7 additions and 0 deletions
|
@ -2146,9 +2146,16 @@ gst_ffmpegviddec_video_frame (GstFFMpegVidDec * ffmpegdec,
|
||||||
GST_VIDEO_BUFFER_FLAG_TFF);
|
GST_VIDEO_BUFFER_FLAG_TFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Temporarily release the video decoder stream lock so that other
|
||||||
|
* threads can continue decoding (e.g. call get_frame()) while data
|
||||||
|
* is being pushed downstream.
|
||||||
|
*/
|
||||||
|
GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec);
|
||||||
*ret =
|
*ret =
|
||||||
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (ffmpegdec),
|
gst_video_decoder_finish_frame (GST_VIDEO_DECODER (ffmpegdec),
|
||||||
output_frame);
|
output_frame);
|
||||||
|
GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
|
||||||
|
|
||||||
beach:
|
beach:
|
||||||
GST_DEBUG_OBJECT (ffmpegdec, "return flow %s, got frame: %d",
|
GST_DEBUG_OBJECT (ffmpegdec, "return flow %s, got frame: %d",
|
||||||
|
|
Loading…
Reference in a new issue