From 904eed35473cda69a030c16f4485a95f7e19f655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Nov 2011 09:18:19 +0100 Subject: [PATCH] basevideoencoder: Adjusting padding is not required for -bad libraries --- gst-libs/gst/video/gstbasevideoencoder.c | 8 ++++---- gst-libs/gst/video/gstbasevideoencoder.h | 9 ++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/gst-libs/gst/video/gstbasevideoencoder.c b/gst-libs/gst/video/gstbasevideoencoder.c index 15fba3ce4b..2c58463529 100644 --- a/gst-libs/gst/video/gstbasevideoencoder.c +++ b/gst-libs/gst/video/gstbasevideoencoder.c @@ -223,7 +223,7 @@ gst_base_video_encoder_init (GstBaseVideoEncoder * base_video_encoder, gst_pad_set_event_function (pad, GST_DEBUG_FUNCPTR (gst_base_video_encoder_src_event)); - base_video_encoder->a.at_eos = FALSE; + base_video_encoder->at_eos = FALSE; base_video_encoder->headers = NULL; /* encoder is expected to do so */ @@ -472,7 +472,7 @@ gst_base_video_encoder_sink_eventfunc (GstBaseVideoEncoder * base_video_encoder, GstFlowReturn flow_ret; GST_BASE_VIDEO_CODEC_STREAM_LOCK (base_video_encoder); - base_video_encoder->a.at_eos = TRUE; + base_video_encoder->at_eos = TRUE; if (base_video_encoder_class->finish) { flow_ret = base_video_encoder_class->finish (base_video_encoder); @@ -510,7 +510,7 @@ gst_base_video_encoder_sink_eventfunc (GstBaseVideoEncoder * base_video_encoder, break; } - base_video_encoder->a.at_eos = FALSE; + base_video_encoder->at_eos = FALSE; gst_segment_set_newsegment_full (&GST_BASE_VIDEO_CODEC (base_video_encoder)->segment, update, rate, applied_rate, format, @@ -746,7 +746,7 @@ gst_base_video_encoder_chain (GstPad * pad, GstBuffer * buf) GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); - if (base_video_encoder->a.at_eos) { + if (base_video_encoder->at_eos) { ret = GST_FLOW_UNEXPECTED; goto done; } diff --git a/gst-libs/gst/video/gstbasevideoencoder.h b/gst-libs/gst/video/gstbasevideoencoder.h index 2de8af0912..df3d111845 100644 --- a/gst-libs/gst/video/gstbasevideoencoder.h +++ b/gst-libs/gst/video/gstbasevideoencoder.h @@ -90,6 +90,7 @@ struct _GstBaseVideoEncoder /* FIXME move to real private part ? * (and introduce a context ?) */ gboolean drained; + gboolean at_eos; gint64 min_latency; gint64 max_latency; @@ -101,13 +102,7 @@ struct _GstBaseVideoEncoder gboolean force_keyframe_pending; gboolean force_keyframe_headers; - union { - void *padding; - gboolean at_eos; - } a; - - /* FIXME before moving to base */ - void *padding[GST_PADDING_LARGE-1]; + void *padding[GST_PADDING_LARGE]; }; /**