From 35c82fee320385b25c28c411300b37ae9a137b70 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Thu, 4 Aug 2016 04:53:50 +1000 Subject: [PATCH] hlsdemux: Don't output pending data after error If the last_ret status is not OK, skip output of any pending PCR scan buffer, similarly to how the pending decryption buffer is handled above. --- ext/hls/gsthlsdemux.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index aab0dbeacf..8824931da6 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -871,20 +871,20 @@ gst_hls_demux_finish_fragment (GstAdaptiveDemux * demux, hls_stream->pending_decrypted_buffer, TRUE); hls_stream->pending_decrypted_buffer = NULL; } - } - if (ret == GST_FLOW_OK || ret == GST_FLOW_NOT_LINKED) { - if (hls_stream->pending_pcr_buffer) { - GstBuffer *buf = hls_stream->pending_pcr_buffer; - hls_stream->pending_pcr_buffer = NULL; + if (ret == GST_FLOW_OK || ret == GST_FLOW_NOT_LINKED) { + if (hls_stream->pending_pcr_buffer) { + GstBuffer *buf = hls_stream->pending_pcr_buffer; + hls_stream->pending_pcr_buffer = NULL; - ret = gst_hls_demux_handle_buffer (demux, stream, buf, TRUE); - } + ret = gst_hls_demux_handle_buffer (demux, stream, buf, TRUE); + } - GST_LOG_OBJECT (stream, - "Fragment PCRs were %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT, - GST_TIME_ARGS (hls_stream->tsreader.first_pcr), - GST_TIME_ARGS (hls_stream->tsreader.last_pcr)); + GST_LOG_OBJECT (stream, + "Fragment PCRs were %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT, + GST_TIME_ARGS (hls_stream->tsreader.first_pcr), + GST_TIME_ARGS (hls_stream->tsreader.last_pcr)); + } } gst_hls_demux_stream_clear_pending_data (hls_stream); -- 2.34.1