From 5f7e15fd6ca9c9bcf9fa18c92949331e70182d36 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 28 Dec 2011 16:23:26 +0100 Subject: [PATCH] pbutils/descriptions: Handle "video/x-raw" without specified format Without having it raise an assertion, which is valid when asking for the description of the format. --- gst-libs/gst/pbutils/descriptions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/pbutils/descriptions.c b/gst-libs/gst/pbutils/descriptions.c index 8b372c2968..6e83f84979 100644 --- a/gst-libs/gst/pbutils/descriptions.c +++ b/gst-libs/gst/pbutils/descriptions.c @@ -302,6 +302,8 @@ format_info_get_desc (const FormatInfo * info, const GstCaps * caps) const GstVideoFormatInfo *finfo; str = gst_structure_get_string (s, "format"); + if (str == NULL) + return g_strdup (_("Uncompressed video")); format = gst_video_format_from_string (str); if (format == GST_VIDEO_FORMAT_UNKNOWN) return g_strdup (_("Uncompressed video"));