tsdemux: flush on pusi only for payload packets

Data should not be flushed out of the tsdemux because a payload unit start
indicator (pusi) is seen in a adaptation only ts packet. If the package contains no
payload a pusi does not indicate a new PES packet, but PSI information, etc.
This fixes playback of several TS files which contain ts packets without
payload but with pusi set to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=676168
This commit is contained in:
Julian Scheel 2012-05-16 16:15:58 +02:00 committed by Sebastian Dröge
parent e75612c3fd
commit 5536bcf8b8

View file

@ -1572,7 +1572,8 @@ gst_ts_demux_handle_packet (GstTSDemux * demux, TSDemuxStream * stream,
return res;
}
if (G_UNLIKELY (packet->payload_unit_start_indicator))
if (G_UNLIKELY (packet->payload_unit_start_indicator) &&
packet->adaptation_field_control & 0x1)
/* Flush previous data */
res = gst_ts_demux_push_pending_data (demux, stream);