Skip to content
Snippets Groups Projects
Commit 598f71d1 authored by Reynaldo H. Verdejo Pinochet's avatar Reynaldo H. Verdejo Pinochet
Browse files

Remove unnecessary NULL checks before g_free()

g_free() is NULL-safe

(Includes unrelated formatting change to go through
indent checker commit hook)
parent 28168ed3
No related branches found
No related tags found
No related merge requests found
......@@ -465,8 +465,7 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
goto bad_input_fmt;
/* second pass stats buffer no longer needed */
if (ffmpegenc->context->stats_in)
g_free (ffmpegenc->context->stats_in);
g_free (ffmpegenc->context->stats_in);
/* Store input state and set output state */
if (ffmpegenc->input_state)
......@@ -556,8 +555,7 @@ close_codec:
}
cleanup_stats_in:
{
if (ffmpegenc->context->stats_in)
g_free (ffmpegenc->context->stats_in);
g_free (ffmpegenc->context->stats_in);
return FALSE;
}
}
......@@ -665,8 +663,7 @@ gst_ffmpegvidenc_handle_frame (GstVideoEncoder * encoder,
goto encode_fail;
/* Encoder needs more data */
if (!have_data)
{
if (!have_data) {
gst_video_codec_frame_unref (frame);
return GST_FLOW_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment