Comment 7 for bug 1028887

Revision history for this message
In , Harald Sitter (apachelogger) wrote :

Git commit d5023e1da8ffae1a8e8a6bdf7fd54004c5ab0b7f by Harald Sitter.
Committed on 28/03/2012 at 04:21.
Pushed by sitter into branch 'master'.

Fix QString crash from using null char*

A tag can *always* be empty, that applies to subtitles too.
Now if a subtitle language tag were empty it would crash QString.
Instead we check if it is null and if so simply say it is "Unknown".
Not the best of things, but if gstreamer fails to provide the language
code I do not see how we could possibly get a sensible name here.
I'd encourage checking back with the reporter of the bug this fixes
on whether other players (most notably VLC) display something specific
for the subtitles (I can totally imagine them having arbitrary names,
for which there surely is a way to access via GST).

Please verify this fixes the issue, as I fail to reproduce it.

Also...
DO NOT EVER USE UNTRANSLATED STRINGS IN POSSIBLY USER VISIBLE STUFF!

Incidentally enough we no more compose "Subtitle n - [lang]" as name but
simply use the ISO lang code from GST for reasons of simplicity and
actually that is the expected value of the name as number etc. are
forced upon the world by the model we use for the public API.

CCMAIL: <email address hidden>
FIXED-IN: 4.6.1

M +14 -11 gstreamer/mediaobject.cpp

http://commits.kde.org/phonon-gstreamer/d5023e1da8ffae1a8e8a6bdf7fd54004c5ab0b7f