mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 23:48:53 +00:00
audio: video: Fix in/outbuf confusion of transform_meta
There are three instances where in- and outbuf have been swapped. This didn't affect the correctness of the libs *filter code, but the videoscale implementation swapped the arguments of meta->transform_func. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/853>
This commit is contained in:
parent
c66e276550
commit
aa89ae8beb
3 changed files with 11 additions and 11 deletions
|
@ -71,8 +71,8 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstAudioFilter, gst_audio_filter,
|
||||||
GST_TYPE_BASE_TRANSFORM, do_init);
|
GST_TYPE_BASE_TRANSFORM, do_init);
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_filter_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf,
|
gst_audio_filter_transform_meta (GstBaseTransform * trans, GstBuffer * outbuf,
|
||||||
GstMeta * meta, GstBuffer * outbuf)
|
GstMeta * meta, GstBuffer * inbuf)
|
||||||
{
|
{
|
||||||
const GstMetaInfo *info = meta->info;
|
const GstMetaInfo *info = meta->info;
|
||||||
const gchar *const *tags;
|
const gchar *const *tags;
|
||||||
|
@ -85,7 +85,7 @@ gst_audio_filter_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
|
|
||||||
return
|
return
|
||||||
GST_BASE_TRANSFORM_CLASS (gst_audio_filter_parent_class)->transform_meta
|
GST_BASE_TRANSFORM_CLASS (gst_audio_filter_parent_class)->transform_meta
|
||||||
(trans, inbuf, meta, outbuf);
|
(trans, outbuf, meta, inbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -348,8 +348,8 @@ invalid_buffer:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_video_filter_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf,
|
gst_video_filter_transform_meta (GstBaseTransform * trans, GstBuffer * outbuf,
|
||||||
GstMeta * meta, GstBuffer * outbuf)
|
GstMeta * meta, GstBuffer * inbuf)
|
||||||
{
|
{
|
||||||
const GstMetaInfo *info = meta->info;
|
const GstMetaInfo *info = meta->info;
|
||||||
const gchar *const *tags;
|
const gchar *const *tags;
|
||||||
|
@ -360,8 +360,8 @@ gst_video_filter_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
&& gst_meta_api_type_has_tag (info->api, META_TAG_VIDEO)))
|
&& gst_meta_api_type_has_tag (info->api, META_TAG_VIDEO)))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return GST_BASE_TRANSFORM_CLASS (parent_class)->transform_meta (trans, inbuf,
|
return GST_BASE_TRANSFORM_CLASS (parent_class)->transform_meta (trans, outbuf,
|
||||||
meta, outbuf);
|
meta, inbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -195,7 +195,7 @@ static GstCaps *gst_video_scale_transform_caps (GstBaseTransform * trans,
|
||||||
static GstCaps *gst_video_scale_fixate_caps (GstBaseTransform * base,
|
static GstCaps *gst_video_scale_fixate_caps (GstBaseTransform * base,
|
||||||
GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
|
GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
|
||||||
static gboolean gst_video_scale_transform_meta (GstBaseTransform * trans,
|
static gboolean gst_video_scale_transform_meta (GstBaseTransform * trans,
|
||||||
GstBuffer * inbuf, GstMeta * meta, GstBuffer * outbuf);
|
GstBuffer * outbuf, GstMeta * meta, GstBuffer * inbuf);
|
||||||
|
|
||||||
static gboolean gst_video_scale_set_info (GstVideoFilter * filter,
|
static gboolean gst_video_scale_set_info (GstVideoFilter * filter,
|
||||||
GstCaps * in, GstVideoInfo * in_info, GstCaps * out,
|
GstCaps * in, GstVideoInfo * in_info, GstCaps * out,
|
||||||
|
@ -500,8 +500,8 @@ gst_video_scale_transform_caps (GstBaseTransform * trans,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_video_scale_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf,
|
gst_video_scale_transform_meta (GstBaseTransform * trans, GstBuffer * outbuf,
|
||||||
GstMeta * meta, GstBuffer * outbuf)
|
GstMeta * meta, GstBuffer * inbuf)
|
||||||
{
|
{
|
||||||
GstVideoFilter *videofilter = GST_VIDEO_FILTER (trans);
|
GstVideoFilter *videofilter = GST_VIDEO_FILTER (trans);
|
||||||
const GstMetaInfo *info = meta->info;
|
const GstMetaInfo *info = meta->info;
|
||||||
|
@ -535,7 +535,7 @@ gst_video_scale_transform_meta (GstBaseTransform * trans, GstBuffer * inbuf,
|
||||||
/* Cant handle the tags in this meta, let the parent class handle it */
|
/* Cant handle the tags in this meta, let the parent class handle it */
|
||||||
if (!should_copy) {
|
if (!should_copy) {
|
||||||
return GST_BASE_TRANSFORM_CLASS (parent_class)->transform_meta (trans,
|
return GST_BASE_TRANSFORM_CLASS (parent_class)->transform_meta (trans,
|
||||||
inbuf, meta, outbuf);
|
outbuf, meta, inbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This meta is size sensitive, try to transform it accordingly */
|
/* This meta is size sensitive, try to transform it accordingly */
|
||||||
|
|
Loading…
Reference in a new issue