[Bug 779453] gst-player: fix gst-player failed to load external subtitle uri

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Mar 8 07:23:55 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=779453

--- Comment #7 from Haihua Hu <jared.hu at nxp.com> ---
(In reply to Sebastian Dröge (slomo) from comment #6)
> Review of attachment 347364 [details] [review]:
> 
> Please explain in more detail what this fixes in the commit message. Also we
> don't use "Signed-off-by: ..."

Ok.

> 
> ::: gst-libs/gst/player/gstplayer.c
> @@ +586,3 @@
>    /* if have suburi from previous playback then free it */
> +  g_object_get(self->playbin, "suburi", &suburi, NULL);
> +  if (self->suburi && suburi && strcmp(self->suburi, suburi)==0) {
> 
> So we reset the suburi here if there was a previous one and it was the same
> as the current one? Why? Shouldn't we just always reset it to NULL, no
> matter if playbin or GstPlayer thought there was a previous one or not?

Yes, you are right, we just need always reset playbin's suburi to NULL when
change uri. Let the application to handle the suburi change and call
gst_player_set_suburi() to load new subtitle

> 
> 
> Please also run "gst-indent" over your changes before sending patches.
> 
> @@ +590,3 @@
>      self->suburi = NULL;
>      g_object_set (self->playbin, "suburi", NULL, NULL);
> +    g_free (suburi);
> 
> You're leaking suburi here if suburi!=NULL but any of the other conditions
> is false.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list