[MPlayer-cvslog] r21048 - trunk/libmpdemux/demux_mov.c
reimar
subversion at mplayerhq.hu
Sun Nov 19 12:55:03 CET 2006
Author: reimar
Date: Sun Nov 19 12:55:03 2006
New Revision: 21048
Modified:
trunk/libmpdemux/demux_mov.c
Log:
Support multiple subs in mov
Modified: trunk/libmpdemux/demux_mov.c
==============================================================================
--- trunk/libmpdemux/demux_mov.c (original)
+++ trunk/libmpdemux/demux_mov.c Sun Nov 19 12:55:03 2006
@@ -2175,6 +2175,8 @@
if (sh->type == 'v')
ds_read_packet(demuxer->sub, demuxer->stream, len, subpts, pos, 0);
else {
+ int i;
+ char *line = priv->subtext;
stream_skip(demuxer->stream, 2); // size
len -= 2;
if (len < 0) len = 0;
@@ -2183,6 +2185,11 @@
priv->subtext[len] = 0;
priv->subs.lines = 1;
priv->subs.text[0] = &priv->subtext;
+ while ((line = strchr(line, '\n'))) {
+ *line++ = 0;
+ priv->subs.text[priv->subs.lines] = line;
+ priv->subs.lines++;
+ }
vo_sub = &priv->subs;
}
priv->current_sub = samplenr;
More information about the MPlayer-cvslog
mailing list