mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +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/7251>
This commit is contained in:
parent
6409510e33
commit
541f9ba34d
1 changed files with 7 additions and 2 deletions
|
@ -888,8 +888,13 @@ gst_svtav1enc_dequeue_encoded_frames (GstSvtAv1Enc * svtav1enc,
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
} else if (res != EB_NoErrorEmptyQueue && output_frames && output_buf) {
|
} else if (res != EB_NoErrorEmptyQueue && output_frames && output_buf) {
|
||||||
// AV1 has no frame re-ordering so always get the oldest frame
|
// AV1 has no frame re-ordering so always get the oldest frame
|
||||||
frame =
|
if (!(frame =
|
||||||
gst_video_encoder_get_oldest_frame (GST_VIDEO_ENCODER (svtav1enc));
|
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
|
if (output_buf->pic_type == EB_AV1_KEY_PICTURE
|
||||||
|| output_buf->pic_type == EB_AV1_INTRA_ONLY_PICTURE) {
|
|| output_buf->pic_type == EB_AV1_INTRA_ONLY_PICTURE) {
|
||||||
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame);
|
||||||
|
|
Loading…
Reference in a new issue