[Mplayer-cvslog] CVS: main/libmpdemux demux_mkv.cpp,1.5,1.6

Moritz Bunkus CVS mosu at mplayerhq.hu
Mon May 5 21:19:03 CEST 2003


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv13931

Modified Files:
	demux_mkv.cpp 
Log Message:
Proper key frame reporting. Proper handling of "no subtitles wanted".

Index: demux_mkv.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mkv.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- demux_mkv.cpp	4 May 2003 11:03:02 -0000	1.5
+++ demux_mkv.cpp	5 May 2003 19:18:22 -0000	1.6
@@ -1520,10 +1520,11 @@
 
   // DO NOT automatically select a subtitle track and behave like DVD
   // playback: only show subtitles if the user explicitely wants them.
-  if (dvdsub_lang != NULL)
-    track = find_track_by_language(mkv_d, dvdsub_lang, NULL);
-  else if (demuxer->sub->id >= 0)
+  track = NULL;
+  if (demuxer->sub->id >= 0)
     track = find_track_by_num(mkv_d, demuxer->sub->id, NULL);
+  else if (dvdsub_lang != NULL)
+    track = find_track_by_language(mkv_d, dvdsub_lang, NULL);
   if (track) {
     if (strcmp(track->codec_id, MKV_S_TEXTASCII) &&
         strcmp(track->codec_id, MKV_S_TEXTUTF8))
@@ -1704,7 +1705,7 @@
                     dp = new_demux_packet(data.Size());
                     memcpy(dp->buffer, data.Buffer(), data.Size());
                     dp->pts = mkv_d->last_pts;
-                    dp->flags = 0;
+                    dp->flags = (elements_found & 4) == 0 ? 1 : 0; // keyframe
                     ds_add_packet(ds, dp);
                     found_data++;
                   }



More information about the MPlayer-cvslog mailing list