1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-04 15:34:31 +00:00

Make sure sub->sh is set when a subtitle is selected

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22175 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-02-08 14:19:18 +00:00
parent 0d48d2f02c
commit a63f68fb4c

View File

@ -2664,6 +2664,10 @@ demux_mkv_open (demuxer_t *demuxer)
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;