diff --git a/ext/closedcaption/gstcccombiner.c b/ext/closedcaption/gstcccombiner.c index aabfba9cc2..bc75884031 100644 --- a/ext/closedcaption/gstcccombiner.c +++ b/ext/closedcaption/gstcccombiner.c @@ -73,7 +73,6 @@ gst_cc_combiner_finalize (GObject * object) g_array_unref (self->current_frame_captions); self->current_frame_captions = NULL; - gst_caps_replace (&self->video_caps, NULL); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -374,7 +373,7 @@ gst_cc_combiner_sink_event (GstAggregator * aggregator, self->video_fps_n = fps_n; self->video_fps_d = fps_d; - self->video_caps = gst_caps_ref (caps); + gst_aggregator_set_src_caps (aggregator, caps); } break; @@ -396,7 +395,6 @@ gst_cc_combiner_stop (GstAggregator * aggregator) self->current_video_running_time = self->current_video_running_time_end = GST_CLOCK_TIME_NONE; gst_buffer_replace (&self->current_video_buffer, NULL); - gst_caps_replace (&self->video_caps, NULL); g_array_set_size (self->current_frame_captions, 0); self->current_caption_type = GST_VIDEO_CAPTION_TYPE_UNKNOWN; @@ -447,21 +445,6 @@ gst_cc_combiner_create_new_pad (GstAggregator * aggregator, return agg_pad; } -static GstFlowReturn -gst_cc_combiner_update_src_caps (GstAggregator * agg, - GstCaps * caps, GstCaps ** ret) -{ - GstFlowReturn res = GST_AGGREGATOR_FLOW_NEED_DATA; - GstCCCombiner *self = GST_CCCOMBINER (agg); - - if (self->video_caps) { - *ret = gst_caps_intersect (caps, self->video_caps); - res = GST_FLOW_OK; - } - - return res; -} - static gboolean gst_cc_combiner_src_query (GstAggregator * aggregator, GstQuery * query) { @@ -594,7 +577,7 @@ gst_cc_combiner_class_init (GstCCCombinerClass * klass) aggregator_class->flush = gst_cc_combiner_flush; aggregator_class->create_new_pad = gst_cc_combiner_create_new_pad; aggregator_class->sink_event = gst_cc_combiner_sink_event; - aggregator_class->update_src_caps = gst_cc_combiner_update_src_caps; + aggregator_class->negotiate = NULL; aggregator_class->get_next_time = gst_aggregator_simple_get_next_time; aggregator_class->src_query = gst_cc_combiner_src_query; aggregator_class->sink_query = gst_cc_combiner_sink_query; diff --git a/ext/closedcaption/gstcccombiner.h b/ext/closedcaption/gstcccombiner.h index 6bf2e67a6b..df3dff0c24 100644 --- a/ext/closedcaption/gstcccombiner.h +++ b/ext/closedcaption/gstcccombiner.h @@ -48,7 +48,6 @@ struct _GstCCCombiner GstClockTime current_video_running_time; GstClockTime current_video_running_time_end; GstBuffer *current_video_buffer; - GstCaps *video_caps; GArray *current_frame_captions; GstVideoCaptionType current_caption_type;