mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 16:51:10 +00:00
openh264dec: Don't forget to unref the input state
This commit is contained in:
parent
76b5c1c511
commit
4c5a504a7b
1 changed files with 3 additions and 0 deletions
|
@ -352,11 +352,13 @@ static GstFlowReturn gst_openh264dec_handle_frame(GstVideoDecoder *decoder, GstV
|
|||
|
||||
flow_status = gst_video_decoder_allocate_output_frame(decoder, frame);
|
||||
if (flow_status != GST_FLOW_OK) {
|
||||
gst_video_codec_state_unref (state);
|
||||
return flow_status;
|
||||
}
|
||||
|
||||
if (!gst_video_frame_map(&video_frame, &state->info, frame->output_buffer, GST_MAP_WRITE)) {
|
||||
GST_ERROR_OBJECT(openh264dec, "Cannot map output buffer!");
|
||||
gst_video_codec_state_unref (state);
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
|
@ -370,6 +372,7 @@ static GstFlowReturn gst_openh264dec_handle_frame(GstVideoDecoder *decoder, GstV
|
|||
memcpy((guchar *)p + (row * row_stride), yuvdata[i] + (row * src_width), component_width);
|
||||
}
|
||||
}
|
||||
gst_video_codec_state_unref (state);
|
||||
|
||||
gst_video_frame_unmap(&video_frame);
|
||||
|
||||
|
|
Loading…
Reference in a new issue