Mercurial > mplayer.hg
changeset 22157:b6f01e891ba8
Make sure sub->sh is set when a subtitle is selected
author | reimar |
---|---|
date | Thu, 08 Feb 2007 14:19:18 +0000 |
parents | 5b8b1e85db32 |
children | a6a93224cf4d |
files | libmpdemux/demux_mkv.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c Thu Feb 08 11:27:18 2007 +0000 +++ b/libmpdemux/demux_mkv.c Thu Feb 08 14:19:18 2007 +0000 @@ -2664,6 +2664,10 @@ MSGTR_MPDEMUX_MKV_WillDisplaySubtitleTrack, track->tnum); dvdsub_id = demux_mkv_reverse_id(mkv_d, track->tnum, MATROSKA_TRACK_SUBTITLE); demuxer->sub->id = track->tnum; + if (demuxer->sub->sh == NULL) + demuxer->sub->sh = malloc(sizeof(sh_sub_t)); + if (demuxer->sub->sh != NULL) + memcpy(demuxer->sub->sh, &track->sh_sub, sizeof(sh_sub_t)); } else demuxer->sub->id = -2;