aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-04-01 19:02:40 +0000
committerMåns Rullgård <mans@mansr.com>2006-04-01 19:02:40 +0000
commit9d9b432ae9913f85d8207806352e909c75ab141e (patch)
tree7ab67fb841a784fde879637e9fb2d59b5852774c /libavformat/mpegts.c
parent00a6b92bdd0618f74a7389b443a7862eb6750c1b (diff)
downloadffmpeg-9d9b432ae9913f85d8207806352e909c75ab141e.tar.gz
This patch simply adds demuxing support for AC-3 streams in DVB TS
files. In these streams AC-3 is given type 0x06 (private stream) and includes a descriptor with either tag 0x6A or 0x7A. The code already handles ATSC AC-3 which uses stream type 0x81. All the new patch does is look for any stream type 0x06 that has a descriptor with the proper tag (i.e. 0x6A or 0x7A) and if found forces it to be recognized as an AC-3 stream. From Andy Brown <abrown at daqtron com> Originally committed as revision 5260 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 09cb116207..54e7043089 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -427,6 +427,11 @@ static void pmt_cb(void *opaque, const uint8_t *section, int section_len)
desc_tag = get8(&p, desc_list_end);
if (desc_tag < 0)
break;
+ if (stream_type == STREAM_TYPE_PRIVATE_DATA &&
+ ((desc_tag == 0x6A) || (desc_tag == 0x7A))) {
+ /*assume DVB AC-3 Audio*/
+ stream_type = STREAM_TYPE_AUDIO_AC3;
+ }
desc_len = get8(&p, desc_list_end);
desc_end = p + desc_len;
if (desc_end > desc_list_end)