fix for caps _normalize changes

This commit is contained in:
Wim Taymans 2012-03-12 12:23:34 +01:00
parent 12cba7c984
commit c3c985cfe1
3 changed files with 9 additions and 10 deletions

View file

@ -324,7 +324,6 @@ gst_jasper_dec_negotiate (GstJasperDec * dec, jas_image_t * image)
} }
/* avoid lists of fourcc, etc */ /* avoid lists of fourcc, etc */
allowed_caps = gst_caps_normalize (caps); allowed_caps = gst_caps_normalize (caps);
gst_caps_unref (caps);
caps = NULL; caps = NULL;
GST_LOG_OBJECT (dec, "allowed source caps %" GST_PTR_FORMAT, allowed_caps); GST_LOG_OBJECT (dec, "allowed source caps %" GST_PTR_FORMAT, allowed_caps);

View file

@ -447,7 +447,7 @@ static GstCaps *
gst_d3dvideosink_get_caps (GstBaseSink * basesink) gst_d3dvideosink_get_caps (GstBaseSink * basesink)
{ {
GstD3DVideoSink *sink = GST_D3DVIDEOSINK (basesink); GstD3DVideoSink *sink = GST_D3DVIDEOSINK (basesink);
GstCaps *caps = gst_caps_new_empty (); GstCaps *caps;
const GstCaps *tempCaps = const GstCaps *tempCaps =
gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (sink)); gst_pad_get_pad_template_caps (GST_VIDEO_SINK_PAD (sink));
@ -457,11 +457,13 @@ gst_d3dvideosink_get_caps (GstBaseSink * basesink)
if (FAILED (IDirect3D9_GetAdapterDisplayMode (shared.d3d, if (FAILED (IDirect3D9_GetAdapterDisplayMode (shared.d3d,
D3DADAPTER_DEFAULT, &d3ddm))) { D3DADAPTER_DEFAULT, &d3ddm))) {
GST_WARNING ("Unable to request adapter display mode"); GST_WARNING ("Unable to request adapter display mode");
gst_caps_unref (caps); caps = tempCaps;
caps = gst_caps_copy (tempCaps);
} else { } else {
gint i; gint i;
GstCaps *c = gst_caps_normalize (tempCaps); GstCaps *c;
caps = gst_caps_new_empty ();
c = gst_caps_normalize (tempCaps);
for (i = 0; i < gst_caps_get_size (c); i++) { for (i = 0; i < gst_caps_get_size (c); i++) {
D3DFORMAT d3dfourcc = 0; D3DFORMAT d3dfourcc = 0;
@ -489,8 +491,7 @@ gst_d3dvideosink_get_caps (GstBaseSink * basesink)
gst_caps_unref (c); gst_caps_unref (c);
} }
} else { } else {
gst_caps_unref (caps); caps = tempCaps;
caps = gst_caps_copy (tempCaps);
} }
return caps; return caps;
} }

View file

@ -172,9 +172,8 @@ colorspace_compare (gint width, gint height, gboolean comp)
gst_caps_unref (rcaps); gst_caps_unref (rcaps);
/* normalize to finally have a list of acceptable fixed formats */ /* normalize to finally have a list of acceptable fixed formats */
tcaps = gst_caps_simplify (caps); caps = gst_caps_simplify (caps);
caps = gst_caps_normalize (tcaps); caps = gst_caps_normalize (caps);
gst_caps_unref (tcaps);
/* set up for running stuff */ /* set up for running stuff */
loop = g_main_loop_new (NULL, FALSE); loop = g_main_loop_new (NULL, FALSE);