changeset 1537:8110f1a20f2a libavformat

add support for FLAC in matroska
author aurel
date Tue, 21 Nov 2006 23:47:21 +0000
parents 6dc55143f99f
children a7413070347a
files matroska.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Tue Nov 21 13:18:21 2006 +0000
+++ b/matroska.c	Tue Nov 21 23:47:21 2006 +0000
@@ -224,6 +224,7 @@
     {"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 @@
                 }
             }
 
+            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;