diff --git a/gst/videoparsers/gstdiracparse.c b/gst/videoparsers/gstdiracparse.c index e474aba489..e71383c406 100644 --- a/gst/videoparsers/gstdiracparse.c +++ b/gst/videoparsers/gstdiracparse.c @@ -136,6 +136,7 @@ gst_dirac_parse_init (GstDiracParse * diracparse) { gst_base_parse_set_min_frame_size (GST_BASE_PARSE (diracparse), 13); gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (diracparse), FALSE); + GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (diracparse)); } void @@ -423,13 +424,7 @@ gst_dirac_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter) res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST); gst_caps_unref (peercaps); - res = gst_caps_make_writable (res); - - /* Append the template caps because we still want to accept - * caps without any fields in the case upstream does not - * know anything. - */ - gst_caps_append (res, templ); + gst_caps_unref (templ); } else { res = templ; } diff --git a/gst/videoparsers/gsth263parse.c b/gst/videoparsers/gsth263parse.c index 63cfb95fc4..e8dfdfbb72 100644 --- a/gst/videoparsers/gsth263parse.c +++ b/gst/videoparsers/gsth263parse.c @@ -91,6 +91,7 @@ gst_h263_parse_class_init (GstH263ParseClass * klass) static void gst_h263_parse_init (GstH263Parse * h263parse) { + GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h263parse)); } static gboolean @@ -397,13 +398,7 @@ gst_h263_parse_get_sink_caps (GstBaseParse * parse, GstCaps * filter) res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST); gst_caps_unref (peercaps); - res = gst_caps_make_writable (res); - - /* Append the template caps because we still want to accept - * caps without any fields in the case upstream does not - * know anything. - */ - gst_caps_append (res, templ); + gst_caps_unref (templ); } else { res = templ; } diff --git a/gst/videoparsers/gsth264parse.c b/gst/videoparsers/gsth264parse.c index 16cb923e60..a9153c819d 100644 --- a/gst/videoparsers/gsth264parse.c +++ b/gst/videoparsers/gsth264parse.c @@ -147,6 +147,7 @@ gst_h264_parse_init (GstH264Parse * h264parse) { h264parse->frame_out = gst_adapter_new (); gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h264parse), FALSE); + GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h264parse)); } @@ -1931,13 +1932,7 @@ gst_h264_parse_get_caps (GstBaseParse * parse, GstCaps * filter) res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST); gst_caps_unref (peercaps); - res = gst_caps_make_writable (res); - - /* Append the template caps because we still want to accept - * caps without any fields in the case upstream does not - * know anything. - */ - gst_caps_append (res, templ); + gst_caps_unref (templ); } else { res = templ; } diff --git a/gst/videoparsers/gsth265parse.c b/gst/videoparsers/gsth265parse.c index 2737b924d5..752c0ffa25 100644 --- a/gst/videoparsers/gsth265parse.c +++ b/gst/videoparsers/gsth265parse.c @@ -142,6 +142,7 @@ gst_h265_parse_init (GstH265Parse * h265parse) { h265parse->frame_out = gst_adapter_new (); gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (h265parse), FALSE); + GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (h265parse)); } @@ -1869,13 +1870,7 @@ gst_h265_parse_get_caps (GstBaseParse * parse, GstCaps * filter) res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST); gst_caps_unref (peercaps); - res = gst_caps_make_writable (res); - - /* Append the template caps because we still want to accept - * caps without any fields in the case upstream does not - * know anything. - */ - gst_caps_append (res, templ); + gst_caps_unref (templ); } else { res = templ; } diff --git a/gst/videoparsers/gstmpeg4videoparse.c b/gst/videoparsers/gstmpeg4videoparse.c index 6b32720550..5698019846 100644 --- a/gst/videoparsers/gstmpeg4videoparse.c +++ b/gst/videoparsers/gstmpeg4videoparse.c @@ -187,6 +187,7 @@ gst_mpeg4vparse_init (GstMpeg4VParse * parse) parse->last_report = GST_CLOCK_TIME_NONE; gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), FALSE); + GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (parse)); } static void @@ -867,13 +868,7 @@ gst_mpeg4vparse_get_caps (GstBaseParse * parse, GstCaps * filter) res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST); gst_caps_unref (peercaps); - res = gst_caps_make_writable (res); - - /* Append the template caps because we still want to accept - * caps without any fields in the case upstream does not - * know anything. - */ - gst_caps_append (res, templ); + gst_caps_unref (templ); } else { res = templ; } diff --git a/gst/videoparsers/gstmpegvideoparse.c b/gst/videoparsers/gstmpegvideoparse.c index ef1f728062..8f5ef84455 100644 --- a/gst/videoparsers/gstmpegvideoparse.c +++ b/gst/videoparsers/gstmpegvideoparse.c @@ -176,6 +176,7 @@ gst_mpegv_parse_init (GstMpegvParse * parse) parse->config_flags = FLAG_NONE; gst_base_parse_set_pts_interpolation (GST_BASE_PARSE (parse), FALSE); + GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (parse)); } static void @@ -1059,13 +1060,7 @@ gst_mpegv_parse_get_caps (GstBaseParse * parse, GstCaps * filter) res = gst_caps_intersect_full (peercaps, templ, GST_CAPS_INTERSECT_FIRST); gst_caps_unref (peercaps); - res = gst_caps_make_writable (res); - - /* Append the template caps because we still want to accept - * caps without any fields in the case upstream does not - * know anything. - */ - gst_caps_append (res, templ); + gst_caps_unref (templ); } else { res = templ; } diff --git a/gst/videoparsers/gstvc1parse.c b/gst/videoparsers/gstvc1parse.c index c96858b93c..7495df2fab 100644 --- a/gst/videoparsers/gstvc1parse.c +++ b/gst/videoparsers/gstvc1parse.c @@ -234,6 +234,7 @@ gst_vc1_parse_init (GstVC1Parse * vc1parse) gst_base_parse_set_has_timing_info (GST_BASE_PARSE (vc1parse), FALSE); gst_vc1_parse_reset (vc1parse); + GST_PAD_SET_ACCEPT_INTERSECT (GST_BASE_PARSE_SINK_PAD (vc1parse)); } static void