summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2015-11-20 10:48:47 -0800
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2015-11-20 10:48:47 -0800
commit598f71d12cef1894a7ff5e7012dac6f14adae364 (patch)
tree7bad9089d10c43ded5c73ca2cbe6a8f39d3bba3f
parent28168ed305f504920b9f270fe342047a544abe0f (diff)
downloadgst-libav-598f71d12cef1894a7ff5e7012dac6f14adae364.tar.gz
Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe (Includes unrelated formatting change to go through indent checker commit hook)
-rw-r--r--ext/libav/gstavvidenc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ext/libav/gstavvidenc.c b/ext/libav/gstavvidenc.c
index e161732..1df1699 100644
--- a/ext/libav/gstavvidenc.c
+++ b/ext/libav/gstavvidenc.c
@@ -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;
}