Mercurial > libavformat.hg
comparison avidec.c @ 2315:f93b242dde21 libavformat
Hack to support XSUB subtitles in AVI
author | reimar |
---|---|
date | Sun, 05 Aug 2007 12:11:16 +0000 |
parents | a3e79d6e4e3c |
children | 4cd9594b588d |
comparison
equal
deleted
inserted
replaced
2314:85ed1e2ce41e | 2315:f93b242dde21 |
---|---|
409 get_le32(pb); /* ImageSize */ | 409 get_le32(pb); /* ImageSize */ |
410 get_le32(pb); /* XPelsPerMeter */ | 410 get_le32(pb); /* XPelsPerMeter */ |
411 get_le32(pb); /* YPelsPerMeter */ | 411 get_le32(pb); /* YPelsPerMeter */ |
412 get_le32(pb); /* ClrUsed */ | 412 get_le32(pb); /* ClrUsed */ |
413 get_le32(pb); /* ClrImportant */ | 413 get_le32(pb); /* ClrImportant */ |
414 | |
415 if (tag1 == MKTAG('D', 'X', 'S', 'B')) { | |
416 st->codec->codec_type = CODEC_TYPE_SUBTITLE; | |
417 st->codec->codec_tag = tag1; | |
418 st->codec->codec_id = CODEC_ID_XSUB; | |
419 break; | |
420 } | |
414 | 421 |
415 if(size > 10*4 && size<(1<<30)){ | 422 if(size > 10*4 && size<(1<<30)){ |
416 st->codec->extradata_size= size - 10*4; | 423 st->codec->extradata_size= size - 10*4; |
417 st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); | 424 st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE); |
418 get_buffer(pb, st->codec->extradata, st->codec->extradata_size); | 425 get_buffer(pb, st->codec->extradata, st->codec->extradata_size); |