From 2ec92613486aa34ed43206b3a27709c336008310 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 6 Dec 2017 14:22:49 +0100 Subject: ogmparse: Make sure we set valid string on caps the fourcc might not contain printable characters, use the convenience macro to turn it into a printable fourcc, like it's done in gstogmparse --- ext/ogg/gstogmparse.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ext/ogg/gstogmparse.c b/ext/ogg/gstogmparse.c index 12c53a1bf..d86ed2a53 100644 --- a/ext/ogg/gstogmparse.c +++ b/ext/ogg/gstogmparse.c @@ -572,10 +572,14 @@ gst_ogm_parse_stream_header (GstOgmParse * ogm, const guint8 * data, guint size) caps = gst_riff_create_video_caps (fourcc, NULL, NULL, NULL, NULL, NULL); if (caps == NULL) { - GST_WARNING_OBJECT (ogm, "could not find video caps for fourcc %" - GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); - caps = gst_caps_new_simple ("video/x-ogm-unknown", "fourcc", - G_TYPE_STRING, ogm->hdr.subtype, NULL); + gchar *fstr = + g_strdup_printf ("%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); + GST_WARNING_OBJECT (ogm, "could not find video caps for fourcc '%s'", + fstr); + caps = + gst_caps_new_simple ("video/x-ogm-unknown", "fourcc", G_TYPE_STRING, + fstr, NULL); + g_free (fstr); break; } -- cgit v1.2.1