Skip to content

Commit

Permalink
codec error handling: Provide friendly name in error message.
Browse files Browse the repository at this point in the history
[error] Provide friendly name for missing codec in error message. JB#47099
  • Loading branch information
abranson committed Dec 11, 2019
1 parent 27f59e7 commit 6cf56f9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions rpm/0003-Provide-friendly-name-for-missing-codec.patch
@@ -0,0 +1,26 @@
From da2f70445e98468bb4a28f9a7f570894ac5b6966 Wed, 11 Dec 2019 11:25:59 +0100
From: Andrew Branson <andrew.branson@jolla.com>
Date: Wed, 11 Dec 2019 11:25:29 +0100
Subject: [PATCH] [error] Provide friendly name for missing codec in error message. JB#47099

diff --git a/gst/playback/gsturidecodebin.c b/gst/playback/gsturidecodebin.c
index f19f69a..059b30a 100644
--- a/gst/playback/gsturidecodebin.c
+++ b/gst/playback/gsturidecodebin.c
@@ -38,6 +38,7 @@
#include <gst/gst.h>
#include <gst/gst-i18n-plugin.h>
#include <gst/pbutils/missing-plugins.h>
+#include <gst/pbutils/pbutils.h>

#include "gstplay-enum.h"
#include "gstrawcaps.h"
@@ -918,7 +919,7 @@

capsstr = gst_caps_to_string (caps);
GST_ELEMENT_WARNING (decoder, STREAM, CODEC_NOT_FOUND,
- (_("No decoder available for type \'%s\'."), capsstr), (NULL));
+ (gst_pb_utils_get_codec_description(caps)), (NULL));
g_free (capsstr);
}

2 changes: 2 additions & 0 deletions rpm/gst-plugins-base.spec
Expand Up @@ -13,6 +13,7 @@ Source: http://gstreamer.freedesktop.org/src/gst-plugins-base/gstreamer1
Patch0: 0000-Move-encodebin-sources-to-encodebasebin.patch
Patch1: 0001-encodebin-Split-implementation-into-a-base-class.patch
Patch2: 0002-splitencodebin-Add-new-element.patch
Patch3: 0003-Provide-friendly-name-for-missing-codec.patch

%define sonamever %(echo %{version} | cut -d '+' -f 1)

Expand Down Expand Up @@ -66,6 +67,7 @@ GStreamer Plugins Base library applications
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build

Expand Down

0 comments on commit 6cf56f9

Please sign in to comment.