From 1b5e514a05126b48a9a69590e98e4392c0deda23 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 13 May 2014 13:54:23 +0200 Subject: [PATCH] mpegtbase: Small rewrite Setting done was useless anyway --- gst/mpegtsdemux/mpegtsbase.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c index bd105c8814..0fef7c720d 100644 --- a/gst/mpegtsdemux/mpegtsbase.c +++ b/gst/mpegtsdemux/mpegtsbase.c @@ -1194,12 +1194,10 @@ mpegts_base_scan (MpegTSBase * base) GST_DEBUG ("Grabbing %d => %d", i * 65536, 65536); ret = gst_pad_pull_range (base->sinkpad, i * 65536, 65536, &buf); - if (G_UNLIKELY (ret == GST_FLOW_EOS)) { - done = TRUE; + if (G_UNLIKELY (ret == GST_FLOW_EOS)) break; - } else if (G_UNLIKELY (ret != GST_FLOW_OK)) { + if (G_UNLIKELY (ret != GST_FLOW_OK)) goto beach; - } /* Push to packetizer */ mpegts_packetizer_push (base->packetizer, buf); @@ -1247,12 +1245,10 @@ mpegts_base_scan (MpegTSBase * base) GST_DEBUG ("Grabbing %" G_GUINT64_FORMAT " => %d", seek_pos, 65536); ret = gst_pad_pull_range (base->sinkpad, seek_pos, 65536, &buf); - if (G_UNLIKELY (ret == GST_FLOW_EOS)) { - done = TRUE; + if (G_UNLIKELY (ret == GST_FLOW_EOS)) break; - } else if (G_UNLIKELY (ret != GST_FLOW_OK)) { + if (G_UNLIKELY (ret != GST_FLOW_OK)) goto beach; - } /* Push to packetizer */ mpegts_packetizer_push (base->packetizer, buf); -- 2.34.1