mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
gstvideoaggregator: always update converter when needed
In prepare_frame, it is not enough for the target info (conversion_info) to not have changed to decide not to update the converter, as the vpad info may have changed as well. Fixes #714
This commit is contained in:
parent
ad68f71d9a
commit
64d2e6b70d
1 changed files with 18 additions and 22 deletions
|
@ -398,31 +398,27 @@ gst_video_aggregator_convert_pad_prepare_frame (GstVideoAggregatorPad * vpad,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
pad->priv->converter_config_changed = FALSE;
|
pad->priv->converter_config_changed = FALSE;
|
||||||
|
|
||||||
if (!pad->priv->conversion_info.finfo
|
pad->priv->conversion_info = conversion_info;
|
||||||
|| !gst_video_info_is_equal (&conversion_info,
|
|
||||||
&pad->priv->conversion_info)) {
|
|
||||||
pad->priv->conversion_info = conversion_info;
|
|
||||||
|
|
||||||
if (pad->priv->convert)
|
if (pad->priv->convert)
|
||||||
gst_video_converter_free (pad->priv->convert);
|
gst_video_converter_free (pad->priv->convert);
|
||||||
pad->priv->convert = NULL;
|
pad->priv->convert = NULL;
|
||||||
|
|
||||||
if (!gst_video_info_is_equal (&vpad->info, &pad->priv->conversion_info)) {
|
if (!gst_video_info_is_equal (&vpad->info, &pad->priv->conversion_info)) {
|
||||||
pad->priv->convert =
|
pad->priv->convert =
|
||||||
gst_video_converter_new (&vpad->info, &pad->priv->conversion_info,
|
gst_video_converter_new (&vpad->info, &pad->priv->conversion_info,
|
||||||
pad->priv->converter_config ? gst_structure_copy (pad->
|
pad->priv->converter_config ? gst_structure_copy (pad->
|
||||||
priv->converter_config) : NULL);
|
priv->converter_config) : NULL);
|
||||||
if (!pad->priv->convert) {
|
if (!pad->priv->convert) {
|
||||||
GST_WARNING_OBJECT (pad, "No path found for conversion");
|
GST_WARNING_OBJECT (pad, "No path found for conversion");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d",
|
|
||||||
GST_VIDEO_INFO_FORMAT (&vpad->info),
|
|
||||||
GST_VIDEO_INFO_FORMAT (&pad->priv->conversion_info));
|
|
||||||
} else {
|
|
||||||
GST_DEBUG_OBJECT (pad, "This pad will not need conversion");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d",
|
||||||
|
GST_VIDEO_INFO_FORMAT (&vpad->info),
|
||||||
|
GST_VIDEO_INFO_FORMAT (&pad->priv->conversion_info));
|
||||||
|
} else {
|
||||||
|
GST_DEBUG_OBJECT (pad, "This pad will not need conversion");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue