summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xine/BluRay/demux_ts.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/xine/BluRay/demux_ts.c b/xine/BluRay/demux_ts.c
index 4c79ee7f..b9dce7df 100644
--- a/xine/BluRay/demux_ts.c
+++ b/xine/BluRay/demux_ts.c
@@ -2257,10 +2257,16 @@ static int demux_ts_get_optional_data(demux_plugin_t *this_gen,
case DEMUX_OPTIONAL_DATA_SPULANG:
if (channel>=0 && channel<this->spu_langs_count) {
- memcpy(str, this->spu_langs[channel].desc.lang, 3);
- str[3] = 0;}
- else
+ if (this->spu_langs[channel].desc.lang[0]) {
+ memcpy(str, this->spu_langs[channel].desc.lang, 3);
+ str[3] = 0;
+ } else
+ sprintf(str, "%3i", channel);
+ }
+ else {
strcpy(str, "none");
+ return DEMUX_OPTIONAL_UNSUPPORTED;
+ }
return DEMUX_OPTIONAL_SUCCESS;
default: