changeset 20181:f691ddd93296

simplify mp_property_sub
author reimar
date Thu, 12 Oct 2006 18:10:45 +0000
parents 1d431fc6e6aa
children d6d52e8e2f03
files mplayer.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Thu Oct 12 18:10:23 2006 +0000
+++ b/mplayer.c	Thu Oct 12 18:10:45 2006 +0000
@@ -2107,7 +2107,6 @@
         if (demuxer->type == DEMUXER_TYPE_MATROSKA && dvdsub_id >= 0) {
             char lang[40] = MSGTR_Unknown;
             demux_mkv_get_sub_lang(demuxer, dvdsub_id, lang, 9);
-            lang[39] = 0;
             snprintf(*(char**)arg, 63, "(%d) %s", dvdsub_id, lang);
             return 1;
         }
@@ -2129,14 +2128,11 @@
         }
 #ifdef USE_DVDREAD
         if (vo_spudec && dvdsub_id >= 0) {
-            char lang[3] = "\0\0\0";
-            int code = 0;
-            code = dvd_lang_from_sid(stream, dvdsub_id);
-            if (code) {
+            char lang[3];
+            int code = dvd_lang_from_sid(stream, dvdsub_id);
                 lang[0] = code >> 8;
                 lang[1] = code;
                 lang[2] = 0;
-            }
             snprintf(*(char**)arg, 63, "(%d) %s",
                      dvdsub_id, lang);
             return 1;