Mercurial > libavformat.hg
comparison mov.c @ 1032:58a0e351ef4c libavformat
fix demuxing of CDR-Dinner_LAN_800k.mp4
author | bcoudurier |
---|---|
date | Fri, 24 Mar 2006 16:52:56 +0000 |
parents | 480c84af0f61 |
children | a757a0a3824f |
comparison
equal
deleted
inserted
replaced
1031:480c84af0f61 | 1032:58a0e351ef4c |
---|---|
944 dprintf("size=%d 4CC= %c%c%c%c codec_type=%d\n", | 944 dprintf("size=%d 4CC= %c%c%c%c codec_type=%d\n", |
945 size, | 945 size, |
946 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, (format >> 24) & 0xff, | 946 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff, (format >> 24) & 0xff, |
947 st->codec->codec_type); | 947 st->codec->codec_type); |
948 st->codec->codec_tag = format; | 948 st->codec->codec_tag = format; |
949 /* codec_type is set earlier by read_hdlr */ | 949 id = codec_get_id(mov_audio_tags, format); |
950 if (id > 0) { | |
951 st->codec->codec_type = CODEC_TYPE_AUDIO; | |
952 } else if (format != MKTAG('m', 'p', '4', 's')) { /* skip old asf mpeg4 tag */ | |
953 id = codec_get_id(mov_video_tags, format); | |
954 if (id <= 0) | |
955 id = codec_get_id(codec_bmp_tags, format); | |
956 if (id > 0) | |
957 st->codec->codec_type = CODEC_TYPE_VIDEO; | |
958 } | |
959 | |
950 if(st->codec->codec_type==CODEC_TYPE_VIDEO) { | 960 if(st->codec->codec_type==CODEC_TYPE_VIDEO) { |
951 /* for MPEG4: set codec type by looking for it */ | |
952 id = codec_get_id(mov_video_tags, format); | |
953 if(id <= 0) | |
954 id = codec_get_id(codec_bmp_tags, format); | |
955 st->codec->codec_id = id; | 961 st->codec->codec_id = id; |
956 get_be16(pb); /* version */ | 962 get_be16(pb); /* version */ |
957 get_be16(pb); /* revision level */ | 963 get_be16(pb); /* revision level */ |
958 get_be32(pb); /* vendor */ | 964 get_be32(pb); /* vendor */ |
959 get_be32(pb); /* temporal quality */ | 965 get_be32(pb); /* temporal quality */ |
1056 } else | 1062 } else |
1057 st->codec->palctrl = NULL; | 1063 st->codec->palctrl = NULL; |
1058 } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) { | 1064 } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) { |
1059 uint16_t version = get_be16(pb); | 1065 uint16_t version = get_be16(pb); |
1060 | 1066 |
1061 st->codec->codec_id = codec_get_id(mov_audio_tags, format); | 1067 st->codec->codec_id = id; |
1062 get_be16(pb); /* revision level */ | 1068 get_be16(pb); /* revision level */ |
1063 get_be32(pb); /* vendor */ | 1069 get_be32(pb); /* vendor */ |
1064 | 1070 |
1065 st->codec->channels = get_be16(pb); /* channel count */ | 1071 st->codec->channels = get_be16(pb); /* channel count */ |
1066 st->codec->bits_per_sample = get_be16(pb); /* sample size */ | 1072 st->codec->bits_per_sample = get_be16(pb); /* sample size */ |