summaryrefslogtreecommitdiff
path: root/gst/mpegtsmux
diff options
context:
space:
mode:
authorLuis de Bethencourt <luisbg@osg.samsung.com>2015-11-12 11:42:36 +0000
committerLuis de Bethencourt <luisbg@osg.samsung.com>2015-11-12 11:42:40 +0000
commit7bec955fe0961e405feab420dbda5339acc4840d (patch)
treee6fb6c0ded66f87aaafcb1051a541efa80628577 /gst/mpegtsmux
parent7c495b711e0a5d4d424af562c5738e08cc849a14 (diff)
downloadgstreamer-plugins-bad-7bec955fe0961e405feab420dbda5339acc4840d.tar.gz
mpegtsmux: remove unnecessary buffer check
buf surely isn't NULL inside the block conditional to a buffer size bigger than (G_MAXUINT16 - 3). Plus gst_buffer_unref() checks if the buffer is NULL and does nothing if it is. CID 1338693
Diffstat (limited to 'gst/mpegtsmux')
-rw-r--r--gst/mpegtsmux/mpegtsmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index e18aa75a9..1d208a712 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -1308,8 +1308,8 @@ mpegtsmux_collected_buffer (GstCollectPads * pads, GstCollectData * data,
if (best->stream->is_meta && gst_buffer_get_size (buf) > (G_MAXUINT16 - 3)) {
GST_WARNING_OBJECT (mux, "KLV meta unit too big, splitting not supported");
- if (buf)
- gst_buffer_unref (buf);
+
+ gst_buffer_unref (buf);
return GST_FLOW_OK;
}