diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:52:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:52:12 +0000 |
commit | 974c21ad33bfa1d93d5ae795556d35ca7eb36e68 (patch) | |
tree | 1a0d7c0258aadfcd993c4bffa454bcf117b382cf /debian/patches/escape-url-passed-to-gstreamer.diff | |
parent | Adding upstream version 1:7.0.4. (diff) | |
download | libreoffice-974c21ad33bfa1d93d5ae795556d35ca7eb36e68.tar.xz libreoffice-974c21ad33bfa1d93d5ae795556d35ca7eb36e68.zip |
Adding debian version 1:7.0.4-4+deb11u8.debian/1%7.0.4-4+deb11u8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/escape-url-passed-to-gstreamer.diff')
-rw-r--r-- | debian/patches/escape-url-passed-to-gstreamer.diff | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/debian/patches/escape-url-passed-to-gstreamer.diff b/debian/patches/escape-url-passed-to-gstreamer.diff new file mode 100644 index 000000000..0ee942b2e --- /dev/null +++ b/debian/patches/escape-url-passed-to-gstreamer.diff @@ -0,0 +1,49 @@ +From e21cfe638b82824db85bb4e8870f3d986c989fc8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com> +Date: Fri, 3 Nov 2023 14:20:07 +0000 +Subject: escape url passed to gstreamer + +Change-Id: I3c93ee34800cc8563370f75ef3ef6f8a9220e6ec +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158894 +Tested-by: Jenkins +Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> +(cherry picked from commit f41dcadf6492a6ffd32696d50f818e44355b9ad9) +--- + avmedia/source/gstreamer/gstframegrabber.cxx | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx +index bc183d563332..0135a78ed597 100644 +--- a/avmedia/source/gstreamer/gstframegrabber.cxx ++++ b/avmedia/source/gstreamer/gstframegrabber.cxx +@@ -51,11 +51,9 @@ void FrameGrabber::disposePipeline() + FrameGrabber::FrameGrabber( const OUString &rURL ) : + FrameGrabber_BASE() + { +- gchar *pPipelineStr; +- pPipelineStr = g_strdup_printf( +- "uridecodebin uri=%s ! videoconvert ! videoscale ! appsink " +- "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"", +- OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() ); ++ const char pPipelineStr[] = ++ "uridecodebin name=source ! videoconvert ! videoscale ! appsink " ++ "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\""; + + GError *pError = nullptr; + mpPipeline = gst_parse_launch( pPipelineStr, &pError ); +@@ -66,6 +64,12 @@ FrameGrabber::FrameGrabber( const OUString &rURL ) : + } + + if( mpPipeline ) { ++ ++ if (GstElement *pUriDecode = gst_bin_get_by_name(GST_BIN(mpPipeline), "source")) ++ g_object_set(pUriDecode, "uri", OUStringToOString(rURL, RTL_TEXTENCODING_UTF8).getStr(), nullptr); ++ else ++ g_warning("Missing 'source' element in gstreamer pipeline"); ++ + // pre-roll + switch( gst_element_set_state( mpPipeline, GST_STATE_PAUSED ) ) { + case GST_STATE_CHANGE_FAILURE: +-- +cgit v1.2.1 + |