mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
videometa: gst_buffer_add_meta() can return NULL
https://bugzilla.gnome.org/show_bug.cgi?id=697824
This commit is contained in:
parent
d56f3381a5
commit
52d269b6b1
1 changed files with 14 additions and 0 deletions
|
@ -36,6 +36,10 @@ gst_video_meta_transform (GstBuffer * dest, GstMeta * meta,
|
|||
dmeta =
|
||||
(GstVideoMeta *) gst_buffer_add_meta (dest, GST_VIDEO_META_INFO,
|
||||
NULL);
|
||||
|
||||
if (!dmeta)
|
||||
return FALSE;
|
||||
|
||||
dmeta->buffer = dest;
|
||||
|
||||
GST_DEBUG ("copy video metadata");
|
||||
|
@ -221,6 +225,9 @@ gst_buffer_add_video_meta_full (GstBuffer * buffer,
|
|||
meta =
|
||||
(GstVideoMeta *) gst_buffer_add_meta (buffer, GST_VIDEO_META_INFO, NULL);
|
||||
|
||||
if (!meta)
|
||||
return NULL;
|
||||
|
||||
meta->flags = flags;
|
||||
meta->format = format;
|
||||
meta->id = 0;
|
||||
|
@ -419,6 +426,10 @@ gst_video_gl_texture_upload_meta_transform (GstBuffer * dest, GstMeta * meta,
|
|||
dmeta =
|
||||
(GstVideoGLTextureUploadMeta *) gst_buffer_add_meta (dest,
|
||||
GST_VIDEO_GL_TEXTURE_UPLOAD_META_INFO, NULL);
|
||||
|
||||
if (!dmeta)
|
||||
return FALSE;
|
||||
|
||||
dmeta->buffer = dest;
|
||||
dmeta->upload = smeta->upload;
|
||||
dmeta->user_data = smeta->user_data;
|
||||
|
@ -476,6 +487,9 @@ gst_buffer_add_video_gl_texture_upload_meta (GstBuffer * buffer,
|
|||
(GstVideoGLTextureUploadMeta *) gst_buffer_add_meta (buffer,
|
||||
GST_VIDEO_GL_TEXTURE_UPLOAD_META_INFO, NULL);
|
||||
|
||||
if (!meta)
|
||||
return NULL;
|
||||
|
||||
meta->buffer = buffer;
|
||||
meta->upload = upload;
|
||||
meta->user_data = user_data;
|
||||
|
|
Loading…
Reference in a new issue