msdkdec: set pointer to NULL to avoid freeing an used surface

The surface should be cached in the surface list when GST_FLOW_OK is
going to be returned

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1051
This commit is contained in:
Haihao Xiang 2019-09-11 15:06:58 +08:00 committed by Víctor Manuel Jáquez Leal
parent 38c55de132
commit c05acf40a8

View file

@ -1067,6 +1067,7 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
if (bitstream.DataLength == 0) {
flow = GST_FLOW_OK;
surface = NULL;
break;
}
} else if (status == MFX_ERR_MORE_DATA) {