mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
x264enc: Check more video info fields to decide whether to reconfigure encoder
The encoder is also initialised using interlace mode, colorimetry, chroma-site and multiview mode, so let's make sure we only skip reinitialising the encoder in set_format() if none of those have changed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4395>
This commit is contained in:
parent
15b7c7ea25
commit
d0d40c7845
1 changed files with 7 additions and 1 deletions
|
@ -2332,7 +2332,13 @@ gst_x264_enc_set_format (GstVideoEncoder * video_enc,
|
|||
if (info->finfo->format == old->finfo->format
|
||||
&& info->width == old->width && info->height == old->height
|
||||
&& info->fps_n == old->fps_n && info->fps_d == old->fps_d
|
||||
&& info->par_n == old->par_n && info->par_d == old->par_d) {
|
||||
&& info->par_n == old->par_n && info->par_d == old->par_d
|
||||
&& info->interlace_mode == old->interlace_mode
|
||||
&& gst_video_colorimetry_is_equal (&info->colorimetry,
|
||||
&old->colorimetry)
|
||||
&& GST_VIDEO_INFO_CHROMA_SITE (info) == GST_VIDEO_INFO_CHROMA_SITE (old)
|
||||
&& GST_VIDEO_INFO_MULTIVIEW_MODE (info) ==
|
||||
GST_VIDEO_INFO_MULTIVIEW_MODE (old)) {
|
||||
gst_video_codec_state_unref (encoder->input_state);
|
||||
encoder->input_state = gst_video_codec_state_ref (state);
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue