diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2013-04-11 13:25:51 -0400 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2013-04-11 23:47:36 +0100 |
commit | 52d269b6b19e1eb46a8b41a13f58e4ffb6692097 (patch) | |
tree | ee739e0fbb759654b833c39ab92b7ee83235d467 | |
parent | d56f3381a571bbc82715262b213ff49d8ec0adbd (diff) |
videometa: gst_buffer_add_meta() can return NULL
https://bugzilla.gnome.org/show_bug.cgi?id=697824
-rw-r--r-- | gst-libs/gst/video/gstvideometa.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gst-libs/gst/video/gstvideometa.c b/gst-libs/gst/video/gstvideometa.c index 13883f1c0..dfce22e15 100644 --- a/gst-libs/gst/video/gstvideometa.c +++ b/gst-libs/gst/video/gstvideometa.c @@ -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; |