Skip to content
Commit bcbae488 authored by Harald Sitter's avatar Harald Sitter 🐧
Browse files

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.

BUG: 288305

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: romain.perier@gmail.com
FIXED-IN: 4.6.1
parent e79d309b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment