summaryrefslogtreecommitdiffstats
path: root/ext/jpeg/gstjpegdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/jpeg/gstjpegdec.c')
-rw-r--r--ext/jpeg/gstjpegdec.c2
1 files changed, 2 insertions, 0 deletions
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),