From dcb57780efb9d4b63f59f7404f37a1756d942bf3 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 30 Oct 2012 18:41:56 +0000 Subject: [PATCH] sbc: sbcdec: skip the frame on decoding error --- ext/sbc/gstsbcdec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/sbc/gstsbcdec.c b/ext/sbc/gstsbcdec.c index 98aa94b6f3..808344617a 100644 --- a/ext/sbc/gstsbcdec.c +++ b/ext/sbc/gstsbcdec.c @@ -108,8 +108,10 @@ sbc_dec_chain (GstPad * pad, GstBuffer * buffer) GST_BUFFER_DATA (output), codesize, NULL); GST_INFO_OBJECT (dec, "consumed %d bytes", consumed); - if (consumed <= 0) - break; + if (consumed <= 0) { + offset += sbc_get_frame_length (&dec->sbc); + continue; + } rate = gst_sbc_parse_rate_from_sbc (dec->sbc.frequency); channels = gst_sbc_get_channel_number (dec->sbc.mode);