From 0ff8556f6518a33618025bd59fa421b52f0ee0e0 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 27 Dec 2012 09:55:14 +0100 Subject: [PATCH] vaapidecode: avoid double release of frame on error. Don't call gst_video_decoder_drop_frame() if gst_video_decoder_finish_frame() was already called before and it returned an error. In that case, we were releasing the frame again, thus leading to a "double-free" condition. --- gst/vaapi/gstvaapidecode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c index b588046342..4c459d6152 100644 --- a/gst/vaapi/gstvaapidecode.c +++ b/gst/vaapi/gstvaapidecode.c @@ -276,7 +276,6 @@ error_create_buffer: error_commit_buffer: { GST_DEBUG("video sink rejected the video buffer (error %d)", ret); - gst_video_decoder_drop_frame(vdec, out_frame); gst_video_codec_frame_unref(out_frame); return GST_FLOW_UNEXPECTED; }