From 7394deef33892f56b54e0f853499787032da883f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 30 Apr 2012 12:36:46 +0200 Subject: [PATCH] tsbase: unref bad packets too Conflicts: gst/mpegtsdemux/mpegtsbase.c --- gst/mpegtsdemux/mpegtsbase.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c index 7fbd84fa5f..38beef2e19 100644 --- a/gst/mpegtsdemux/mpegtsbase.c +++ b/gst/mpegtsdemux/mpegtsbase.c @@ -1385,9 +1385,12 @@ mpegts_base_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) if (G_UNLIKELY (pret == PACKET_NEED_MORE)) break; - if (G_UNLIKELY (pret == PACKET_BAD)) + if (G_UNLIKELY (pret == PACKET_BAD)) { /* bad header, skip the packet */ + GST_DEBUG_OBJECT (base, "bad packet, skipping"); + gst_buffer_unref (packet.buffer); goto next; + } /* base PSI data */ if (packet.payload != NULL && mpegts_base_is_psi (base, &packet)) { -- 2.34.1