When a media object detected a subtitle, this one is used in all subsequent playback until another subtitle is set.
Details
- Reviewers
dvratil - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- R488:73128a60dae2: Avoid using subtitles of a previously played media
Localy tested.
Diff Detail
- Repository
- R488 Phonon: GStreamer backend
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
gstreamer/mediaobject.cpp | ||
---|---|---|
342 | This cleanup could be done conditionally or outside this if block. |
gstreamer/mediaobject.cpp | ||
---|---|---|
328 | I think it would be better to call changeSubUri(Mrl()); from here, and adjust changeSubUri() to set suburi to NULL when mrl.isNull() and to mrl.toEncoded().costData() otherwise. |
gstreamer/mediaobject.cpp | ||
---|---|---|
328 | I sort of did what you suggested, but I'd rather avoid calling qgetenv for all media files only those that do have a subtitle since this cleaning will always be called. |
gstreamer/mediaobject.cpp | ||
---|---|---|
306 | Well, I did this on purpose : I thought it does not matter not to remove the previously set subtitle font related properties, as without the suburi they are useless. I don't know well glib myself, I am not sure this is the best way to, but I couldn't find any other way and it works. |
Looks good now, thanks!
gstreamer/mediaobject.cpp | ||
---|---|---|
306 | g_object_set can take multiple property-value argument pairs, but the very last argument must be NULL so that the code knows there are no more arguments after it, which is why I asked for the NULL. Anyway, using g_object_set_property is also a good alternative, since we are only changing a single property :) |