mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
videoencoder: protect the use of num_subframes
change stream lock location to protect the use of frame->abidata.ABI.num_subframes
This commit is contained in:
parent
8df947df5d
commit
19f27f94ee
1 changed files with 2 additions and 2 deletions
|
@ -2486,6 +2486,8 @@ gst_video_encoder_finish_subframe (GstVideoEncoder * encoder,
|
|||
g_return_val_if_fail (frame->output_buffer, GST_FLOW_ERROR);
|
||||
|
||||
subframe_buffer = frame->output_buffer;
|
||||
|
||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
||||
discont = (frame->presentation_frame_number == 0
|
||||
&& frame->abidata.ABI.num_subframes == 0);
|
||||
|
||||
|
@ -2497,8 +2499,6 @@ gst_video_encoder_finish_subframe (GstVideoEncoder * encoder,
|
|||
frame->presentation_frame_number, GST_TIME_ARGS (frame->pts),
|
||||
GST_TIME_ARGS (frame->dts), GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame));
|
||||
|
||||
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
|
||||
|
||||
ret = gst_video_encoder_can_push_unlocked (encoder);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto done;
|
||||
|
|
Loading…
Reference in a new issue