From f5eebb27a2f6f8897a5e0abaa465c48dadebff42 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 1 Jul 2015 10:58:07 +0200 Subject: [PATCH] {audio,video}{en,de}oder: Also copy POOL metas and make sure to copy over metas when creating subbuffers POOL meta just means that this specific instance of the meta is related to a pool, a copy should be made when reasonable and the flag should just not be set in the copy. --- gst-libs/gst/audio/gstaudiodecoder.c | 7 +------ gst-libs/gst/audio/gstaudioencoder.c | 7 +------ gst-libs/gst/video/gstvideodecoder.c | 7 +------ gst-libs/gst/video/gstvideoencoder.c | 7 +------ 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 845f2bf..0b283d3 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -1193,12 +1193,7 @@ foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) const GstMetaInfo *info = (*meta)->info; gboolean do_copy = FALSE; - if (GST_META_FLAG_IS_SET (*meta, GST_META_FLAG_POOLED)) { - /* never call the transform_meta with pool private metadata */ - GST_DEBUG_OBJECT (decoder, "not copying pooled metadata %s", - g_type_name (info->api)); - do_copy = FALSE; - } else if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { + if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { /* never call the transform_meta with memory specific metadata */ GST_DEBUG_OBJECT (decoder, "not copying memory specific metadata %s", g_type_name (info->api)); diff --git a/gst-libs/gst/audio/gstaudioencoder.c b/gst-libs/gst/audio/gstaudioencoder.c index 511622f..6c87eaf 100644 --- a/gst-libs/gst/audio/gstaudioencoder.c +++ b/gst-libs/gst/audio/gstaudioencoder.c @@ -664,12 +664,7 @@ foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) const GstMetaInfo *info = (*meta)->info; gboolean do_copy = FALSE; - if (GST_META_FLAG_IS_SET (*meta, GST_META_FLAG_POOLED)) { - /* never call the transform_meta with pool private metadata */ - GST_DEBUG_OBJECT (encoder, "not copying pooled metadata %s", - g_type_name (info->api)); - do_copy = FALSE; - } else if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { + if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { /* never call the transform_meta with memory specific metadata */ GST_DEBUG_OBJECT (encoder, "not copying memory specific metadata %s", g_type_name (info->api)); diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c index 7128580..a749098 100644 --- a/gst-libs/gst/video/gstvideodecoder.c +++ b/gst-libs/gst/video/gstvideodecoder.c @@ -2871,12 +2871,7 @@ foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) const GstMetaInfo *info = (*meta)->info; gboolean do_copy = FALSE; - if (GST_META_FLAG_IS_SET (*meta, GST_META_FLAG_POOLED)) { - /* never call the transform_meta with pool private metadata */ - GST_DEBUG_OBJECT (decoder, "not copying pooled metadata %s", - g_type_name (info->api)); - do_copy = FALSE; - } else if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { + if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { /* never call the transform_meta with memory specific metadata */ GST_DEBUG_OBJECT (decoder, "not copying memory specific metadata %s", g_type_name (info->api)); diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c index d9bc4e2..992bb5d 100644 --- a/gst-libs/gst/video/gstvideoencoder.c +++ b/gst-libs/gst/video/gstvideoencoder.c @@ -1837,12 +1837,7 @@ foreach_metadata (GstBuffer * inbuf, GstMeta ** meta, gpointer user_data) const GstMetaInfo *info = (*meta)->info; gboolean do_copy = FALSE; - if (GST_META_FLAG_IS_SET (*meta, GST_META_FLAG_POOLED)) { - /* never call the transform_meta with pool private metadata */ - GST_DEBUG_OBJECT (encoder, "not copying pooled metadata %s", - g_type_name (info->api)); - do_copy = FALSE; - } else if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { + if (gst_meta_api_type_has_tag (info->api, _gst_meta_tag_memory)) { /* never call the transform_meta with memory specific metadata */ GST_DEBUG_OBJECT (encoder, "not copying memory specific metadata %s", g_type_name (info->api)); -- 2.7.4