mpegtsmux: Handle zero-sized buffers correctly without going into an infinite loop

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/844
This commit is contained in:
Sebastian Dröge 2018-12-10 16:13:37 +02:00 committed by Nicolas Dufresne
parent a171f30ab1
commit bb135ba764

View file

@ -304,7 +304,7 @@ tsmux_stream_consume (TsMuxStream * stream, guint len)
stream->cur_buffer_consumed += len;
stream->bytes_avail -= len;
if (stream->cur_buffer_consumed == 0)
if (stream->cur_buffer_consumed == 0 && stream->cur_buffer->size != 0)
return;
if (GST_CLOCK_STIME_IS_VALID (stream->cur_buffer->pts)) {