mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtmp2: Fix NULL check in gst_rtmp_meta_transform
Coverity rightly complains that checking a pointer for NULL after dereferencing it is pointless. Remove the check, and to be safe, assert that gst_buffer_add_meta returns non-NULL. CID 1455485
This commit is contained in:
parent
f730f4a694
commit
346bca80af
1 changed files with 2 additions and 1 deletions
|
@ -196,7 +196,7 @@ gst_rtmp_meta_transform (GstBuffer * dest, GstMeta * meta, GstBuffer * buffer,
|
||||||
dmeta->type = smeta->type;
|
dmeta->type = smeta->type;
|
||||||
dmeta->mstream = smeta->mstream;
|
dmeta->mstream = smeta->mstream;
|
||||||
|
|
||||||
return dmeta != NULL;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GstMetaInfo *
|
const GstMetaInfo *
|
||||||
|
@ -221,6 +221,7 @@ gst_buffer_add_rtmp_meta (GstBuffer * buffer)
|
||||||
g_return_val_if_fail (GST_IS_BUFFER (buffer), NULL);
|
g_return_val_if_fail (GST_IS_BUFFER (buffer), NULL);
|
||||||
|
|
||||||
meta = (GstRtmpMeta *) gst_buffer_add_meta (buffer, GST_RTMP_META_INFO, NULL);
|
meta = (GstRtmpMeta *) gst_buffer_add_meta (buffer, GST_RTMP_META_INFO, NULL);
|
||||||
|
g_assert (meta != NULL);
|
||||||
|
|
||||||
return meta;
|
return meta;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue