[vlc-commits] mkv: Fix track format initialization

Hugo Beauzée-Luyssen git at videolan.org
Fri Jul 21 15:32:56 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Jul 21 15:29:34 2017 +0200| [7ba6a7f50636933254f070166f8bd8ee5b7aa3b2] | committer: Hugo Beauzée-Luyssen

mkv: Fix track format initialization

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ba6a7f50636933254f070166f8bd8ee5b7aa3b2
---

 modules/demux/mkv/matroska_segment_parse.cpp | 5 +++--
 modules/demux/mkv/mkv.hpp                    | 2 --
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index 28acd332b0..f00dfef3e3 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -220,15 +220,16 @@ void matroska_segment_c::ParseTrackEntry( const KaxTrackEntry *m )
             es_format_Init( &track.fmt, AUDIO_ES, 0);
             track.fmt.audio.i_channels = 1;
             track.fmt.audio.i_rate = 8000;
+            track.fmt.psz_language = strdup("English");
             break;
         case track_video:
             es_format_Init( &track.fmt, VIDEO_ES, 0);
+            track.fmt.psz_language = strdup("English");
             break;
         case track_subtitle:
-            es_format_Init( &track.fmt, SPU_ES, 0);
-            break;
         case track_buttons:
             es_format_Init( &track.fmt, SPU_ES, 0);
+            track.fmt.psz_language = strdup("English");
             break;
         default:
             es_format_Init( &track.fmt, UNKNOWN_ES, 0);
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index 5439df5d15..2209f8c9d1 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -212,9 +212,7 @@ class mkv_track_t
           ,i_seek_preroll(0)
           ,i_codec_delay(0)
         {
-            std::memset( &fmt, 0, sizeof( fmt ) );
             std::memset( &pi_chan_table, 0, sizeof( pi_chan_table ) );
-            fmt.psz_language = strdup("English");
         }
 
         typedef unsigned int track_id_t;



More information about the vlc-commits mailing list