summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2018-09-27 17:15:20 +0200
committerMathieu Duponchelle <mathieu@centricular.com>2018-09-27 17:34:10 +0200
commit14b9a34f54a9b66e75c8eba3282d10b88ae651d6 (patch)
tree2b4284db53f15c221cec7a316553de08f5125d9d
parent8e8eb41ddfd986b2cce574e0edbd8d2be2e444ce (diff)
mpegtsmux: add custom AC-3 descriptor
tsdemux expects a custom descriptor (GST_MTS_DESC_AC3_AUDIO_STREAM) to detect a stream as AC3 and not EAC3. Note that tsdemux expects this descriptor because mpegtsmux writes a stream with a HDMV registration descriptor. Fixes: gst-launch-1.0 -v audiotestsrc ! avenc_ac3 ! ac3parse ! mpegtsmux ! \ tsdemux ! ac3parse ! avdec_ac3 ! audioconvert ! autoaudiosink https://bugzilla.gnome.org/show_bug.cgi?id=797220
-rw-r--r--gst/mpegtsmux/tsmux/tsmuxstream.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/mpegtsmux/tsmux/tsmuxstream.c b/gst/mpegtsmux/tsmux/tsmuxstream.c
index 4cbd21770..bd01c420b 100644
--- a/gst/mpegtsmux/tsmux/tsmuxstream.c
+++ b/gst/mpegtsmux/tsmux/tsmuxstream.c
@@ -974,7 +974,11 @@ tsmux_stream_get_es_descrs (TsMuxStream * stream,
descriptor = gst_mpegts_descriptor_from_registration ("AC-3",
add_info, 6);
+ g_ptr_array_add (pmt_stream->descriptors, descriptor);
+ descriptor =
+ gst_mpegts_descriptor_from_custom (GST_MTS_DESC_AC3_AUDIO_STREAM,
+ add_info, 6);
g_ptr_array_add (pmt_stream->descriptors, descriptor);
break;