mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
vaapipostproc: minor clean-ups.
Use g_clear_object() wherever appropriate and remove dead-code.
This commit is contained in:
parent
6b259abc02
commit
a0e587667a
1 changed files with 5 additions and 9 deletions
|
@ -232,10 +232,7 @@ gst_vaapipostproc_start(GstVaapiPostproc *postproc)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapipostproc_stop(GstVaapiPostproc *postproc)
|
gst_vaapipostproc_stop(GstVaapiPostproc *postproc)
|
||||||
{
|
{
|
||||||
if (postproc->display) {
|
g_clear_object(&postproc->display);
|
||||||
g_object_unref(postproc->display);
|
|
||||||
postproc->display = NULL;
|
|
||||||
}
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +243,7 @@ gst_vaapipostproc_process(GstVaapiPostproc *postproc, GstBuffer *buf)
|
||||||
GstVaapiSurfaceProxy *proxy;
|
GstVaapiSurfaceProxy *proxy;
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstBuffer *outbuf = NULL;
|
GstBuffer *outbuf;
|
||||||
guint outbuf_flags, flags;
|
guint outbuf_flags, flags;
|
||||||
gboolean tff;
|
gboolean tff;
|
||||||
|
|
||||||
|
@ -254,8 +251,6 @@ gst_vaapipostproc_process(GstVaapiPostproc *postproc, GstBuffer *buf)
|
||||||
if (!meta)
|
if (!meta)
|
||||||
goto error_invalid_buffer;
|
goto error_invalid_buffer;
|
||||||
|
|
||||||
flags = gst_vaapi_video_meta_get_render_flags(meta);
|
|
||||||
|
|
||||||
/* Deinterlacing disabled, push frame */
|
/* Deinterlacing disabled, push frame */
|
||||||
if (!postproc->deinterlace) {
|
if (!postproc->deinterlace) {
|
||||||
outbuf = gst_buffer_ref(buf);
|
outbuf = gst_buffer_ref(buf);
|
||||||
|
@ -272,8 +267,9 @@ gst_vaapipostproc_process(GstVaapiPostproc *postproc, GstBuffer *buf)
|
||||||
proxy = gst_vaapi_video_meta_get_surface_proxy(meta);
|
proxy = gst_vaapi_video_meta_get_surface_proxy(meta);
|
||||||
tff = GST_BUFFER_FLAG_IS_SET(buf, GST_VIDEO_BUFFER_FLAG_TFF);
|
tff = GST_BUFFER_FLAG_IS_SET(buf, GST_VIDEO_BUFFER_FLAG_TFF);
|
||||||
|
|
||||||
flags &= ~(GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD|
|
flags = gst_vaapi_video_meta_get_render_flags(meta) &
|
||||||
GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD);
|
~(GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD|
|
||||||
|
GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD);
|
||||||
|
|
||||||
/* First field */
|
/* First field */
|
||||||
outbuf = gst_vaapi_video_buffer_new_with_surface_proxy(proxy);
|
outbuf = gst_vaapi_video_buffer_new_with_surface_proxy(proxy);
|
||||||
|
|
Loading…
Reference in a new issue