gst_player_set_uri_internal shouldn't free suburi which maybe set by user to load external subtitle before start play. It just need reset playbin's subutri property to NULL no matter if there was a previous one or not.
Signed-off-by: Yuqing Zhu <carol....@nxp.com> --- ...fix-gst-player-failed-to-load-external-su.patch | 50 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb | 1 + 2 files changed, 51 insertions(+) create mode 100755 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch new file mode 100755 index 0000000..0d42243 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0006-gst-player-fix-gst-player-failed-to-load-external-su.patch @@ -0,0 +1,50 @@ +From a085090ec68efccd4d82c7cf4ea6f18fb475c4d8 Mon Sep 17 00:00:00 2001 +From: Haihua Hu <jared...@nxp.com> +Date: Thu, 2 Mar 2017 14:36:56 +0800 +Subject: [PATCH] gst-player: fix gst-player failed to load external subtitle + uri + +gst_player_set_uri_internal shouldn't free suburi which maybe set +by user to load external subtitle before start play. It just need +reset playbin's subutri property to NULL no matter if there was a +previous one or not. + +Upstream-Status: Backport[1.11.3] +https://bugzilla.gnome.org/show_bug.cgi?id=779453 + +Signed-off-by: Haihua Hu <jared...@nxp.com> +--- + gst-libs/gst/player/gstplayer.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/gst-libs/gst/player/gstplayer.c b/gst-libs/gst/player/gstplayer.c +index fc5463a..3757a09 100644 +--- a/gst-libs/gst/player/gstplayer.c ++++ b/gst-libs/gst/player/gstplayer.c +@@ -582,12 +582,7 @@ gst_player_set_uri_internal (gpointer user_data) + (GDestroyNotify) uri_loaded_signal_data_free); + } + +- /* if have suburi from previous playback then free it */ +- if (self->suburi) { +- g_free (self->suburi); +- self->suburi = NULL; +- g_object_set (self->playbin, "suburi", NULL, NULL); +- } ++ g_object_set (self->playbin, "suburi", NULL, NULL); + + g_mutex_unlock (&self->lock); + +@@ -667,6 +662,9 @@ gst_player_set_property (GObject * object, guint prop_id, + g_free (self->redirect_uri); + self->redirect_uri = NULL; + ++ g_free (self->suburi); ++ self->suburi = NULL; ++ + self->uri = g_value_dup_string (value); + GST_DEBUG_OBJECT (self, "Set uri=%s", self->uri); + g_mutex_unlock (&self->lock); +-- +1.9.1 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb index 82cd91c..91e1a51 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb @@ -22,6 +22,7 @@ SRC_URI = " \ file://0003-player-Add-configuration-for-enabling-accurate-seeks.patch \ file://0004-player-Add-get-track-number-media-info-API.patch \ file://0005-player-Add-overlayvideorenderer-video-sink.patch \ + file://0006-gst-player-fix-gst-player-failed-to-load-external-su.patch \ " SRC_URI[md5sum] = "2757103e57a096a1a05b3ab85b8381af" SRC_URI[sha256sum] = "23ddae506b3a223b94869a0d3eea3e9a12e847f94d2d0e0b97102ce13ecd6966" -- 1.9.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core