Commit b64e4e07 authored by reimar's avatar reimar

Extract the pure plaintext from mov text subtitles.

Formatting information etc. is discarded.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11625 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 5d6598a6
...@@ -1542,6 +1542,12 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -1542,6 +1542,12 @@ static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
} else { } else {
#endif #endif
av_get_packet(s->pb, pkt, sample->size); 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 #ifdef CONFIG_DV_DEMUXER
if (mov->dv_demux) { if (mov->dv_demux) {
void *pkt_destruct_func = pkt->destruct; void *pkt_destruct_func = pkt->destruct;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment