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>
pull/108/head
goodthanks 11 years ago committed by Michael Niedermayer
parent 7e7b668ef5
commit c9cfd45838
  1. 3
      libavformat/mpegts.h
  2. 6
      libavformat/mpegtsenc.c

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

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

Loading…
Cancel
Save