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.
This commit is contained in:
Gwenole Beauchesne 2012-12-27 09:55:14 +01:00
parent 9e643a6147
commit 0ff8556f65

View file

@ -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;
}