mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-08 00:59:48 +00:00
rtmp2: Check for missing GstRtmpMeta
The message buffers are created using `gst_rtmp_message_new` and thus always contain a GstRtmpMeta. Add checks to appease Coverity's static analysis. CID 1455596 CID 1455384
This commit is contained in:
parent
8d7489a734
commit
f730f4a694
2 changed files with 5 additions and 1 deletions
|
@ -195,6 +195,7 @@ select_chunk_type (GstRtmpChunkStream * cstream, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
old_meta = gst_buffer_get_rtmp_meta (old_buffer);
|
||||
g_return_val_if_fail (old_meta, -1);
|
||||
|
||||
if (old_meta->mstream != meta->mstream) {
|
||||
GST_TRACE ("Picking header 0: stream mismatch; "
|
||||
|
|
|
@ -734,11 +734,14 @@ is_command_response (const gchar * command_name)
|
|||
static void
|
||||
gst_rtmp_connection_handle_cm (GstRtmpConnection * sc, GstBuffer * buffer)
|
||||
{
|
||||
GstRtmpMeta *meta = gst_buffer_get_rtmp_meta (buffer);
|
||||
GstRtmpMeta *meta;
|
||||
gchar *command_name;
|
||||
gdouble transaction_id;
|
||||
GPtrArray *args;
|
||||
|
||||
meta = gst_buffer_get_rtmp_meta (buffer);
|
||||
g_return_if_fail (meta);
|
||||
|
||||
{
|
||||
GstMapInfo map;
|
||||
gst_buffer_map (buffer, &map, GST_MAP_READ);
|
||||
|
|
Loading…
Reference in a new issue