mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
mpegtsdemux: Deliver all packets to tsparse
34af8ed66a
changed the code to use the
packetizer's packets instead of the incoming buffers, but mpegtsbase
didn't actually push all packets to the subclass. As a result, padding
(PID 0x1FFF) packets got lost.
Add a new boolean to toggle pushing unknown packets to mpegtsbase and
have mpegtsparse make use of it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1300>
This commit is contained in:
parent
2dc689c2c8
commit
23a2916afd
4 changed files with 6 additions and 2 deletions
|
@ -1491,6 +1491,8 @@ mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||
if (base->push_section)
|
||||
res = klass->push (base, &packet, section);
|
||||
|
||||
} else if (base->push_unknown) {
|
||||
res = klass->push (base, &packet, NULL);
|
||||
} else if (packet.payload && packet.pid != 0x1fff)
|
||||
GST_LOG ("PID 0x%04x Saw packet on a pid we don't handle", packet.pid);
|
||||
|
||||
|
|
|
@ -160,6 +160,7 @@ struct _MpegTSBase {
|
|||
/* Whether to push data and/or sections to subclasses */
|
||||
gboolean push_data;
|
||||
gboolean push_section;
|
||||
gboolean push_unknown;
|
||||
|
||||
/* Whether the parent bin is streams-aware, meaning we can
|
||||
* add/remove streams at any point in time */
|
||||
|
|
|
@ -994,7 +994,7 @@ mpegts_packetizer_push_section (MpegTSPacketizer2 * packetizer,
|
|||
* If it is not a PUSI
|
||||
* Accumulate the expected data and check for complete section
|
||||
* (loop)
|
||||
*
|
||||
*
|
||||
**/
|
||||
|
||||
if (packet->payload_unit_start_indicator) {
|
||||
|
@ -1950,7 +1950,7 @@ record_pcr (MpegTSPacketizer2 * packetizer, MpegTSPCR * pcrtable,
|
|||
GList *tmp;
|
||||
/* No current estimator. This happens for the initial value, or after
|
||||
* discont and flushes. Figure out where we need to record this position.
|
||||
*
|
||||
*
|
||||
* Possible choices:
|
||||
* 1) No groups at all:
|
||||
* Create a new group with pcr/offset
|
||||
|
|
|
@ -210,6 +210,7 @@ mpegts_parse_init (MpegTSParse2 * parse)
|
|||
base->program_size = sizeof (MpegTSParseProgram);
|
||||
base->push_data = TRUE;
|
||||
base->push_section = TRUE;
|
||||
base->push_unknown = TRUE;
|
||||
|
||||
parse->user_pcr_pid = parse->pcr_pid = -1;
|
||||
|
||||
|
|
Loading…
Reference in a new issue