videometa: gst_buffer_add_meta() can return NULL

https://bugzilla.gnome.org/show_bug.cgi?id=697824
This commit is contained in:
Víctor Manuel Jáquez Leal 2013-04-11 13:25:51 -04:00 committed by Tim-Philipp Müller
parent d56f3381a5
commit 52d269b6b1

View file

@ -36,6 +36,10 @@ gst_video_meta_transform (GstBuffer * dest, GstMeta * meta,
dmeta = dmeta =
(GstVideoMeta *) gst_buffer_add_meta (dest, GST_VIDEO_META_INFO, (GstVideoMeta *) gst_buffer_add_meta (dest, GST_VIDEO_META_INFO,
NULL); NULL);
if (!dmeta)
return FALSE;
dmeta->buffer = dest; dmeta->buffer = dest;
GST_DEBUG ("copy video metadata"); GST_DEBUG ("copy video metadata");
@ -221,6 +225,9 @@ gst_buffer_add_video_meta_full (GstBuffer * buffer,
meta = meta =
(GstVideoMeta *) gst_buffer_add_meta (buffer, GST_VIDEO_META_INFO, NULL); (GstVideoMeta *) gst_buffer_add_meta (buffer, GST_VIDEO_META_INFO, NULL);
if (!meta)
return NULL;
meta->flags = flags; meta->flags = flags;
meta->format = format; meta->format = format;
meta->id = 0; meta->id = 0;
@ -419,6 +426,10 @@ gst_video_gl_texture_upload_meta_transform (GstBuffer * dest, GstMeta * meta,
dmeta = dmeta =
(GstVideoGLTextureUploadMeta *) gst_buffer_add_meta (dest, (GstVideoGLTextureUploadMeta *) gst_buffer_add_meta (dest,
GST_VIDEO_GL_TEXTURE_UPLOAD_META_INFO, NULL); GST_VIDEO_GL_TEXTURE_UPLOAD_META_INFO, NULL);
if (!dmeta)
return FALSE;
dmeta->buffer = dest; dmeta->buffer = dest;
dmeta->upload = smeta->upload; dmeta->upload = smeta->upload;
dmeta->user_data = smeta->user_data; 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, (GstVideoGLTextureUploadMeta *) gst_buffer_add_meta (buffer,
GST_VIDEO_GL_TEXTURE_UPLOAD_META_INFO, NULL); GST_VIDEO_GL_TEXTURE_UPLOAD_META_INFO, NULL);
if (!meta)
return NULL;
meta->buffer = buffer; meta->buffer = buffer;
meta->upload = upload; meta->upload = upload;
meta->user_data = user_data; meta->user_data = user_data;