mfutils: Move IMediaType release function to common utility

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1280>
This commit is contained in:
Seungha Yang 2020-05-24 00:46:38 +09:00 committed by GStreamer Merge Bot
parent c8469644dd
commit 18f5bdee16
3 changed files with 9 additions and 7 deletions

View file

@ -346,6 +346,13 @@ gst_mf_media_type_to_caps (IMFMediaType * media_type)
return NULL;
}
void
gst_mf_media_type_release (IMFMediaType * media_type)
{
if (media_type)
media_type->Release ();
}
static gchar *
gst_mf_hr_to_string (HRESULT hr)
{

View file

@ -48,6 +48,8 @@ const GUID * gst_mf_video_subtype_from_video_format (GstVideoFormat format);
GstCaps * gst_mf_media_type_to_caps (IMFMediaType * media_type);
void gst_mf_media_type_release (IMFMediaType * media_type);
gboolean _gst_mf_result (HRESULT hr,
GstDebugCategory * cat,
const gchar * file,

View file

@ -109,13 +109,6 @@ gst_mf_video_enc_close (GstVideoEncoder * enc)
return TRUE;
}
static void
gst_mf_media_type_release (IMFMediaType * type)
{
if (type)
type->Release ();
}
static gboolean
gst_mf_video_enc_set_format (GstVideoEncoder * enc, GstVideoCodecState * state)
{