tsmux: Skip empty buffers

They can be created e.g. by aggregator when there is a gap. Such buffers
should not be muxed at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1801>
This commit is contained in:
Vivia Nikolaidou 2022-01-31 16:13:32 +02:00 committed by Tim-Philipp Müller
parent 28c63c1931
commit e025703d31

View file

@ -1335,9 +1335,11 @@ gst_base_ts_mux_aggregate_buffer (GstBaseTsMux * mux,
GST_DEBUG_OBJECT (mux, "delta: %d", delta); GST_DEBUG_OBJECT (mux, "delta: %d", delta);
if (gst_buffer_get_size (buf) > 0) {
stream_data = stream_data_new (buf); stream_data = stream_data_new (buf);
tsmux_stream_add_data (best->stream, stream_data->map_info.data, tsmux_stream_add_data (best->stream, stream_data->map_info.data,
stream_data->map_info.size, stream_data, pts, dts, !delta); stream_data->map_info.size, stream_data, pts, dts, !delta);
}
/* outgoing ts follows ts of PCR program stream */ /* outgoing ts follows ts of PCR program stream */
if (prog->pcr_stream == best->stream) { if (prog->pcr_stream == best->stream) {