mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
svtav1enc: Fix segfault when flushing
gst_video_encoder_get_oldest_frame() is nullable, and will signal that all frames are handled by returning NULL. Fixes #3650 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7249>
This commit is contained in:
parent
f04f6f43c3
commit
0bb336f34c
1 changed files with 7 additions and 2 deletions
|
@ -888,8 +888,13 @@ gst_svtav1enc_dequeue_encoded_frames (GstSvtAv1Enc * svtav1enc,
|
|||
return GST_FLOW_ERROR;
|
||||
} else if (res != EB_NoErrorEmptyQueue && output_frames && output_buf) {
|
||||
// AV1 has no frame re-ordering so always get the oldest frame
|
||||
frame =
|
||||
gst_video_encoder_get_oldest_frame (GST_VIDEO_ENCODER (svtav1enc));
|
||||
if (!(frame =
|
||||
gst_video_encoder_get_oldest_frame (GST_VIDEO_ENCODER
|
||||
(svtav1enc)))) {
|
||||
svt_av1_enc_release_out_buffer (&output_buf);
|
||||
break;
|
||||
}
|
||||
|
||||
if (output_buf->pic_type == EB_AV1_KEY_PICTURE
|
||||
|| output_buf->pic_type == EB_AV1_INTRA_ONLY_PICTURE) {
|
||||
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
||||
|
|
Loading…
Reference in a new issue