diff options
author | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-05-05 19:18:22 +0000 |
---|---|---|
committer | mosu <mosu@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-05-05 19:18:22 +0000 |
commit | 2d9c3add3104975d9c313f1dd3c50b21b378c5d6 (patch) | |
tree | 2d27462ebe405b61d11b81ab4aabdec08833a2dc /libmpdemux | |
parent | 2f8243b5275ae1d290c81217e529a8b964ea6e11 (diff) |
Proper key frame reporting. Proper handling of "no subtitles wanted".
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10074 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_mkv.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libmpdemux/demux_mkv.cpp b/libmpdemux/demux_mkv.cpp index 2978afdc74..e839a6367e 100644 --- a/libmpdemux/demux_mkv.cpp +++ b/libmpdemux/demux_mkv.cpp @@ -1520,10 +1520,11 @@ extern "C" int demux_mkv_open(demuxer_t *demuxer) { // 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 @@ extern "C" int demux_mkv_fill_buffer(demuxer_t *d) { 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++; } |