[FFmpeg-cvslog] matroskaenc: support TTA muxing

Paul B Mahol git at videolan.org
Thu Jan 24 13:02:10 CET 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Jan 24 11:50:41 2013 +0000| [9ddf5631e3192992fa4a8c0ba1863341b43a7a4b] | committer: Paul B Mahol

matroskaenc: support TTA muxing

TTA in matroska does not store any private data.

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ddf5631e3192992fa4a8c0ba1863341b43a7a4b
---

 libavformat/matroskaenc.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 56adaa8..15bf4ed 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -486,7 +486,7 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
                 avio_write(dyn_cp, codec->extradata + 12,
                                    codec->extradata_size - 12);
         }
-        else if (codec->extradata_size)
+        else if (codec->extradata_size && codec->codec_id != AV_CODEC_ID_TTA)
             avio_write(dyn_cp, codec->extradata, codec->extradata_size);
     } else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         if (qt_id) {
@@ -931,13 +931,6 @@ static int mkv_write_header(AVFormatContext *s)
     if (!mkv->tracks)
         return AVERROR(ENOMEM);
 
-    for (i = 0; i < s->nb_streams; i++)
-        if (s->streams[i]->codec->codec_id == AV_CODEC_ID_TTA) {
-            av_log(s, AV_LOG_ERROR, "The Matroska muxer does not yet support muxing %s\n",
-                   avcodec_get_name(s->streams[i]->codec->codec_id));
-            return AVERROR_PATCHWELCOME;
-        }
-
     ebml_header = start_ebml_master(pb, EBML_ID_HEADER, 0);
     put_ebml_uint   (pb, EBML_ID_EBMLVERSION        ,           1);
     put_ebml_uint   (pb, EBML_ID_EBMLREADVERSION    ,           1);
@@ -1373,7 +1366,6 @@ const AVCodecTag additional_audio_tags[] = {
     { AV_CODEC_ID_RA_288,    0xFFFFFFFF },
     { AV_CODEC_ID_COOK,      0xFFFFFFFF },
     { AV_CODEC_ID_TRUEHD,    0xFFFFFFFF },
-    { AV_CODEC_ID_TTA,       0xFFFFFFFF },
     { AV_CODEC_ID_WAVPACK,   0xFFFFFFFF },
     { AV_CODEC_ID_NONE,      0xFFFFFFFF }
 };



More information about the ffmpeg-cvslog mailing list