[FFmpeg-cvslog] r11625 - trunk/libavformat/mov.c
reimar
subversion
Sat Jan 26 22:21:56 CET 2008
Author: reimar
Date: Sat Jan 26 22:21:55 2008
New Revision: 11625
Log:
Extract the pure plaintext from mov text subtitles.
Formatting information etc. is discarded.
Modified:
trunk/libavformat/mov.c
Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c (original)
+++ trunk/libavformat/mov.c Sat Jan 26 22:21:55 2008
@@ -1542,6 +1542,12 @@ static int mov_read_packet(AVFormatConte
} else {
#endif
av_get_packet(s->pb, pkt, sample->size);
+ if (s->streams[sc->ffindex]->codec->codec_id == CODEC_ID_TEXT) {
+ int textlen = FFMIN(AV_RB16(pkt->data), sample->size - 2);
+ textlen = FFMAX(textlen, 0);
+ memmove(pkt->data, pkt->data + 2, textlen);
+ pkt->size = textlen;
+ }
#ifdef CONFIG_DV_DEMUXER
if (mov->dv_demux) {
void *pkt_destruct_func = pkt->destruct;
More information about the ffmpeg-cvslog
mailing list