diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-11 21:45:15 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-11 21:45:15 +0000 |
commit | d9d27bb8c430f85502aa34cd892f5ed31d0aef81 (patch) | |
tree | 398d7a633712d99b71cd0329bc70bd2b8de44726 /libmpdemux/demux_mkv.c | |
parent | 2d0715a915acaae5c4a42452ef512c41896d72c1 (diff) | |
download | mpv-d9d27bb8c430f85502aa34cd892f5ed31d0aef81.tar.bz2 mpv-d9d27bb8c430f85502aa34cd892f5ed31d0aef81.tar.xz |
Init and destroy ass_tracks in demuxer.c based on sh_sub->type value.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25682 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_mkv.c')
-rw-r--r-- | libmpdemux/demux_mkv.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index c67e67d7d0..5363649a3b 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -956,10 +956,6 @@ demux_mkv_free_trackentry(mkv_track_t *track) { free (track->audio_buf); if (track->audio_timestamp) free (track->audio_timestamp); -#ifdef USE_ASS - if (track->sh_sub && track->sh_sub->ass_track) - ass_free_track (track->sh_sub->ass_track); -#endif demux_mkv_free_encodings(track->encodings, track->num_encodings); free(track); } @@ -2254,38 +2250,6 @@ demux_mkv_parse_vobsub_data (demuxer_t *demuxer) } } -/** \brief Parse the private data for SSA/ASS subtitle tracks. - - This function tries to parse the private data for all SSA/ASS tracks. - The private data contains the normal text from the original script, - from the start to the beginning of 'Events' section, including '[Events]' line. - - \param demuxer The generic demuxer. -*/ -#ifdef USE_ASS -static void -demux_mkv_parse_ass_data (demuxer_t *demuxer) -{ - mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv; - mkv_track_t *track; - int i; - - for (i = 0; i < mkv_d->num_tracks; i++) - { - track = mkv_d->tracks[i]; - if (track->type != MATROSKA_TRACK_SUBTITLE || - track->subtitle_type == MATROSKA_SUBTYPE_VOBSUB) - continue; - - if (track->subtitle_type == MATROSKA_SUBTYPE_SSA) - { - track->sh_sub->ass_track = ass_new_track(ass_library); - ass_process_codec_private(track->sh_sub->ass_track, track->private_data, track->private_size); - } - } -} -#endif - static int demux_mkv_open_sub (demuxer_t *demuxer, mkv_track_t *track, int sid) { @@ -2549,10 +2513,7 @@ demux_mkv_open (demuxer_t *demuxer) } demux_mkv_parse_vobsub_data (demuxer); -#ifdef USE_ASS - if (ass_enabled) - demux_mkv_parse_ass_data (demuxer); -#endif + /* DO NOT automatically select a subtitle track and behave like DVD */ /* playback: only show subtitles if the user explicitely wants them. */ track = NULL; |