de265: Don't leak CodecState

Unref it in error case

CID #1417220
This commit is contained in:
Edward Hervey 2017-11-21 16:43:03 +01:00 committed by Edward Hervey
parent 87dbd558cc
commit d6784c238b

View file

@ -519,6 +519,7 @@ _gst_libde265_image_available (GstVideoDecoder * decoder, int width, int height)
}
if (!gst_video_decoder_negotiate (decoder)) {
GST_ERROR_OBJECT (dec, "Failed to negotiate format");
gst_video_codec_state_unref (state);
return GST_FLOW_ERROR;
}
if (dec->output_state != NULL) {