From 8e72746f3590bf954091ce23f2acb68e5c0cac3b Mon Sep 17 00:00:00 2001 From: gb Date: Fri, 12 Mar 2010 10:52:08 +0000 Subject: [PATCH] Avoid use of GstStaticCaps since older gstreamer versions (0.10.22) write to it. --- gst-libs/gst/vaapi/gstvaapiimageformat.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapiimageformat.c b/gst-libs/gst/vaapi/gstvaapiimageformat.c index 370633f..6679d87 100644 --- a/gst-libs/gst/vaapi/gstvaapiimageformat.c +++ b/gst-libs/gst/vaapi/gstvaapiimageformat.c @@ -35,14 +35,14 @@ enum _GstVaapiImageFormatType { struct _GstVaapiImageFormatMap { GstVaapiImageFormatType type; GstVaapiImageFormat format; - GstStaticCaps caps; + const char *caps_str; VAImageFormat va_format; }; #define DEF(TYPE, FORMAT, CAPS_STR) \ GST_VAAPI_IMAGE_FORMAT_TYPE_##TYPE, \ GST_VAAPI_IMAGE_##FORMAT, \ - GST_STATIC_CAPS(CAPS_STR) + CAPS_STR #define DEF_YUV(FORMAT, FOURCC, ENDIAN, BPP) \ { DEF(YCBCR, FORMAT, GST_VIDEO_CAPS_YUV(#FORMAT)), \ { VA_FOURCC FOURCC, VA_##ENDIAN##_FIRST, BPP, }, } @@ -157,18 +157,13 @@ gst_vaapi_image_format_get_va_format(GstVaapiImageFormat format) GstCaps * gst_vaapi_image_format_get_caps(GstVaapiImageFormat format) { - GstCaps *caps; const GstVaapiImageFormatMap *m; m = get_map_from_gst_vaapi_image_format(format); if (!m) return NULL; - caps = gst_static_caps_get(&m->caps); - if (!caps) - return NULL; - - return gst_caps_make_writable(caps); + return gst_caps_from_string(m->caps_str); } guint -- 2.7.4