diff options
author | Edward Hervey <edward@centricular.com> | 2017-12-06 14:22:49 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-12-06 16:40:18 +0200 |
commit | 2ec92613486aa34ed43206b3a27709c336008310 (patch) | |
tree | 9b09899f865e3e56f748899800a4ab10adef97b5 | |
parent | 80882e85b4fbd9f20d76f6e64278cb7997c2114d (diff) | |
download | gstreamer-plugins-base-2ec92613486aa34ed43206b3a27709c336008310.tar.gz |
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
-rw-r--r-- | ext/ogg/gstogmparse.c | 12 |
1 files 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; } |