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@gmx.at>
This commit is contained in:
goodthanks 2014-04-25 14:23:41 +10:00 committed by Michael Niedermayer
parent 7e7b668ef5
commit c9cfd45838
2 changed files with 8 additions and 1 deletions

View File

@ -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;

View File

@ -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;