Mercurial > libavformat.hg
comparison mov.c @ 2972:bc330130bdce libavformat
Set subtitle codec id correctly, i hope this does not break anything.
author | michael |
---|---|
date | Sat, 26 Jan 2008 22:57:53 +0000 |
parents | ed7e36770ee5 |
children | 4b6a9b61e9dd |
comparison
equal
deleted
inserted
replaced
2971:45ffd9c8b23a | 2972:bc330130bdce |
---|---|
231 st->codec->codec_type = CODEC_TYPE_AUDIO; | 231 st->codec->codec_type = CODEC_TYPE_AUDIO; |
232 else if(type == MKTAG('m', '1', 'a', ' ')) | 232 else if(type == MKTAG('m', '1', 'a', ' ')) |
233 st->codec->codec_id = CODEC_ID_MP2; | 233 st->codec->codec_id = CODEC_ID_MP2; |
234 else if(type == MKTAG('s', 'u', 'b', 'p')) { | 234 else if(type == MKTAG('s', 'u', 'b', 'p')) { |
235 st->codec->codec_type = CODEC_TYPE_SUBTITLE; | 235 st->codec->codec_type = CODEC_TYPE_SUBTITLE; |
236 st->codec->codec_id = CODEC_ID_DVD_SUBTITLE; | |
237 } | 236 } |
238 get_be32(pb); /* component manufacture */ | 237 get_be32(pb); /* component manufacture */ |
239 get_be32(pb); /* component flags */ | 238 get_be32(pb); /* component flags */ |
240 get_be32(pb); /* component flags mask */ | 239 get_be32(pb); /* component flags mask */ |
241 | 240 |
786 bits_per_sample = av_get_bits_per_sample(st->codec->codec_id); | 785 bits_per_sample = av_get_bits_per_sample(st->codec->codec_id); |
787 if (bits_per_sample) { | 786 if (bits_per_sample) { |
788 st->codec->bits_per_sample = bits_per_sample; | 787 st->codec->bits_per_sample = bits_per_sample; |
789 sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; | 788 sc->sample_size = (bits_per_sample >> 3) * st->codec->channels; |
790 } | 789 } |
790 } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){ | |
791 st->codec->codec_id= id; | |
791 } else { | 792 } else { |
792 /* other codec type, just skip (rtp, mp4s, tmcd ...) */ | 793 /* other codec type, just skip (rtp, mp4s, tmcd ...) */ |
793 url_fskip(pb, size - (url_ftell(pb) - start_pos)); | 794 url_fskip(pb, size - (url_ftell(pb) - start_pos)); |
794 } | 795 } |
795 /* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */ | 796 /* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */ |