aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2006-11-21 23:47:21 +0000
committerAurelien Jacobs <aurel@gnuage.org>2006-11-21 23:47:21 +0000
commitd9d6e7b7b9c430368a114dcd618f3647c8cfbaa8 (patch)
tree62932bdb246aa2e855b5f37f3f314175a40685c4
parent248bc6bb8cb5641a63a706b1c91c87e677bd80e4 (diff)
downloadffmpeg-d9d6e7b7b9c430368a114dcd618f3647c8cfbaa8.tar.gz
add support for FLAC in matroska
Originally committed as revision 7150 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/matroska.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index 44d07dda08..32146d7c04 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -224,6 +224,7 @@ static CodecTags codec_tags[]={
{"A_DTS" , CODEC_ID_DTS},
{"A_VORBIS" , CODEC_ID_VORBIS},
{"A_AAC" , CODEC_ID_AAC},
+ {"A_FLAC" , CODEC_ID_FLAC},
{"A_WAVPACK4" , CODEC_ID_WAVPACK},
{"A_TTA1" , CODEC_ID_TTA},
{NULL , CODEC_ID_NONE}
@@ -2265,6 +2266,14 @@ matroska_read_header (AVFormatContext *s,
}
}
+ else if (codec_id == CODEC_ID_FLAC) {
+ AVPacket *pkt = av_mallocz(sizeof(AVPacket));
+ av_new_packet(pkt, track->codec_priv_size);
+ memcpy(pkt->data, track->codec_priv, track->codec_priv_size);
+ matroska_queue_packet(matroska, pkt);
+ track->codec_priv_size = 0;
+ }
+
else if (codec_id == CODEC_ID_TTA) {
MatroskaAudioTrack *audiotrack = (MatroskaAudioTrack *) track;
ByteIOContext b;