comparison matroska.c @ 1537:8110f1a20f2a libavformat

add support for FLAC in matroska
author aurel
date Tue, 21 Nov 2006 23:47:21 +0000
parents 4bf9dc98e127
children 241f6efbbcdc
comparison
equal deleted inserted replaced
1536:6dc55143f99f 1537:8110f1a20f2a
222 // {"A_PCM/FLOAT/IEEE" , CODEC_ID_NONE}, 222 // {"A_PCM/FLOAT/IEEE" , CODEC_ID_NONE},
223 {"A_AC3" , CODEC_ID_AC3}, 223 {"A_AC3" , CODEC_ID_AC3},
224 {"A_DTS" , CODEC_ID_DTS}, 224 {"A_DTS" , CODEC_ID_DTS},
225 {"A_VORBIS" , CODEC_ID_VORBIS}, 225 {"A_VORBIS" , CODEC_ID_VORBIS},
226 {"A_AAC" , CODEC_ID_AAC}, 226 {"A_AAC" , CODEC_ID_AAC},
227 {"A_FLAC" , CODEC_ID_FLAC},
227 {"A_WAVPACK4" , CODEC_ID_WAVPACK}, 228 {"A_WAVPACK4" , CODEC_ID_WAVPACK},
228 {"A_TTA1" , CODEC_ID_TTA}, 229 {"A_TTA1" , CODEC_ID_TTA},
229 {NULL , CODEC_ID_NONE} 230 {NULL , CODEC_ID_NONE}
230 /* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */ 231 /* TODO: AC3-9/10 (?), Real, Musepack, Quicktime */
231 }; 232 };
2261 extradata[4] = 0x80 | (sri<<3); 2262 extradata[4] = 0x80 | (sri<<3);
2262 extradata_size = 5; 2263 extradata_size = 5;
2263 } else { 2264 } else {
2264 extradata_size = 2; 2265 extradata_size = 2;
2265 } 2266 }
2267 }
2268
2269 else if (codec_id == CODEC_ID_FLAC) {
2270 AVPacket *pkt = av_mallocz(sizeof(AVPacket));
2271 av_new_packet(pkt, track->codec_priv_size);
2272 memcpy(pkt->data, track->codec_priv, track->codec_priv_size);
2273 matroska_queue_packet(matroska, pkt);
2274 track->codec_priv_size = 0;
2266 } 2275 }
2267 2276
2268 else if (codec_id == CODEC_ID_TTA) { 2277 else if (codec_id == CODEC_ID_TTA) {
2269 MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *) track; 2278 MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *) track;
2270 ByteIOContext b; 2279 ByteIOContext b;