From 3397426d9f1b98e1151ae9e69835a08bb94fb97e Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 18 Jun 2006 14:00:19 +0000 Subject: ext/jpeg/gstjpegdec.c: After a failed buffer alloc, we need to abort the jpeg decoding (it started when parsing heade... Original commit message from CVS: * ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain): After a failed buffer alloc, we need to abort the jpeg decoding (it started when parsing headers to figure out how many bytes we need to request downstream). --- ext/jpeg/gstjpegdec.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/jpeg') diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index 8fadde10..aebfe443 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -1046,6 +1046,8 @@ alloc_failed: reason = gst_flow_get_name (ret); GST_DEBUG_OBJECT (dec, "failed to alloc buffer, reason %s", reason); + /* Reset for next time */ + jpeg_abort_decompress (&dec->cinfo); if (GST_FLOW_IS_FATAL (ret)) { GST_ELEMENT_ERROR (dec, STREAM, DECODE, ("Buffer allocation failed, reason: %s", reason), -- cgit