[FFmpeg-cvslog] avformat/mpegtsenc: Allow DTS audio copy to TS streams

goodthanks git at videolan.org
Sun Apr 27 14:35:57 CEST 2014


ffmpeg | branch: master | goodthanks <tamlyn at internode.on.net> | Fri Apr 25 14:23:41 2014 +1000| [c9cfd45838919ca70fee644dfd8ee1691739c94d] | committer: Michael Niedermayer

avformat/mpegtsenc: Allow DTS audio copy to TS streams

This doesn't allow encoding of DTS or TrueHD. It just sets the correct
stream ID in the TS output file when a DTS or TrueHD audio stream is copied.

Fixes ticket #1398

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/mpegts.h    |    3 ++-
 libavformat/mpegtsenc.c |    6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavformat/mpegts.h b/libavformat/mpegts.h
index d7a9f03..7dfe844 100644
--- a/libavformat/mpegts.h
+++ b/libavformat/mpegts.h
@@ -58,7 +58,8 @@
 #define STREAM_TYPE_VIDEO_DIRAC     0xd1
 
 #define STREAM_TYPE_AUDIO_AC3       0x81
-#define STREAM_TYPE_AUDIO_DTS       0x8a
+#define STREAM_TYPE_AUDIO_DTS       0x82
+#define STREAM_TYPE_AUDIO_TRUEHD    0x83
 
 typedef struct MpegTSContext MpegTSContext;
 
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 47f0a78..78a9786 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -318,6 +318,12 @@ static int mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
         case AV_CODEC_ID_AC3:
             stream_type = STREAM_TYPE_AUDIO_AC3;
             break;
+        case AV_CODEC_ID_DTS:
+            stream_type = STREAM_TYPE_AUDIO_DTS;
+            break;
+        case AV_CODEC_ID_TRUEHD:
+            stream_type = STREAM_TYPE_AUDIO_TRUEHD;
+            break;
         default:
             stream_type = STREAM_TYPE_PRIVATE_DATA;
             break;



More information about the ffmpeg-cvslog mailing list