mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
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
This commit is contained in:
parent
4b4f8d1a05
commit
427df2d5d9
1 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue