summaryrefslogtreecommitdiffstats
path: root/libmpdemux/demux_ts.c
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-07-30 08:37:10 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-07-30 08:37:10 +0000
commit98742de7c1e761be5d3402a13df38db1b2f70eaa (patch)
tree92d6069e6188d334159cd87375fbb7c7f22993c1 /libmpdemux/demux_ts.c
parentfc5f506c839cb15bd8d7f89e17668852af00283f (diff)
downloadmpv-98742de7c1e761be5d3402a13df38db1b2f70eaa.tar.bz2
mpv-98742de7c1e761be5d3402a13df38db1b2f70eaa.tar.xz
handle TrueHD streams (they are carried in 0xFD PES streams in substream 0x72)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29457 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_ts.c')
-rw-r--r--libmpdemux/demux_ts.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c
index c213c34a35..938793bdc4 100644
--- a/libmpdemux/demux_ts.c
+++ b/libmpdemux/demux_ts.c
@@ -77,6 +77,7 @@ typedef enum
AUDIO_DTS = 0x2001,
AUDIO_LPCM_BE = 0x10001,
AUDIO_AAC = mmioFOURCC('M', 'P', '4', 'A'),
+ AUDIO_TRUEHD = mmioFOURCC('T', 'R', 'H', 'D'),
SPU_DVD = 0x3000000,
SPU_DVB = 0x3000001,
PES_PRIVATE1 = 0xBD00000,
@@ -244,7 +245,7 @@ typedef struct {
} TS_pids_t;
-#define IS_AUDIO(x) (((x) == AUDIO_MP2) || ((x) == AUDIO_A52) || ((x) == AUDIO_LPCM_BE) || ((x) == AUDIO_AAC) || ((x) == AUDIO_DTS))
+#define IS_AUDIO(x) (((x) == AUDIO_MP2) || ((x) == AUDIO_A52) || ((x) == AUDIO_LPCM_BE) || ((x) == AUDIO_AAC) || ((x) == AUDIO_DTS) || ((x) == AUDIO_TRUEHD))
#define IS_VIDEO(x) (((x) == VIDEO_MPEG1) || ((x) == VIDEO_MPEG2) || ((x) == VIDEO_MPEG4) || ((x) == VIDEO_H264) || ((x) == VIDEO_AVC) || ((x) == VIDEO_VC1))
static int ts_parse(demuxer_t *demuxer, ES_stream_t *es, unsigned char *packet, int probe);
@@ -871,6 +872,8 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO LPCM(pid=%d)", param->apid);
else if(param->atype == AUDIO_AAC)
mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO AAC(pid=%d)", param->apid);
+ else if(param->atype == AUDIO_TRUEHD)
+ mp_msg(MSGT_DEMUXER, MSGL_INFO, "AUDIO TRUEHD(pid=%d)", param->apid);
else
{
audio_found = 0;
@@ -1412,6 +1415,8 @@ static int pes_parse2(unsigned char *buf, uint16_t packet_len, ES_stream_t *es,
int ssid = parse_pes_extension_fields(p, pkt_len);
if((audio_substream_id!=-1) && (ssid != audio_substream_id))
return 0;
+ if(ssid == 0x72)
+ es->type = type_from_pmt = AUDIO_TRUEHD;
}
p += header_len + 9;