aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-27 16:13:21 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-27 16:13:21 +0000
commit4ddc96baaeb59b9e8ef1d8ea07a3911ee465ade6 (patch)
tree3b8d37737156df64dd4fda2e4db187f414303be3 /libmpdemux
parent0728cf9637920116e623d95081ed147d1993e623 (diff)
Support mov subtitle format directly instead of converting to text in the demuxer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25883 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_mov.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c
index 1ae11f5122..7bf061698b 100644
--- a/libmpdemux/demux_mov.c
+++ b/libmpdemux/demux_mov.c
@@ -1327,8 +1327,10 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
mp_msg(MSGT_DEMUX, MSGL_INFO, MSGTR_SubtitleID, "mov", priv->track_db);
if (trak->fourcc == mmioFOURCC('m','p','4','s'))
init_vobsub(sh, trak);
- else
- sh->type = 't';
+ else {
+ sh->type = 'm';
+ sub_utf8 = 1;
+ }
} else
mp_msg(MSGT_DEMUX, MSGL_V, "Generic track - not completely understood! (id: %d)\n",
trak->id);
@@ -2188,13 +2190,6 @@ if(trak->pos==0 && trak->stream_header_len>0){
int len = trak->samples[samplenr].size;
double subpts = (double)trak->samples[samplenr].pts / (double)trak->timescale;
stream_seek(demuxer->stream, pos);
- if (sh->type != 'v') {
- stream_skip(demuxer->stream, 2); // size
- len -= 2;
- if (len < 0) len = 0;
- if (len > MOV_MAX_SUBLEN) len = MOV_MAX_SUBLEN;
- sub_utf8 = 1;
- }
ds_read_packet(demuxer->sub, demuxer->stream, len, subpts, pos, 0);
priv->current_sub = samplenr;
}