In reply to this post by Слободенюк Александр Игоревич
Le jeudi 07 décembre 2017 à 03:19 +0300, Слободенюк Александр Игоревич
a écrit :
> Hello everybody!
> I have been reading some gst-plugins-good sources and found , that
> case of
> memory allocation failure is tupically ignored there , at least in
> plugins "pngenc" and "avimux".
> gst_avi_mux_riff_get_avix_header (guint32 datax_size)
> GstBuffer *buffer;
> GstMapInfo map;
> buffer = gst_buffer_new_and_alloc (24);
This is fine, the C Library we use, GLib will abort the application if
we run out of memory. If you run-out of virtual memory, you have a
larger problem, better kill applications before it becomes nasty and
> gst_buffer_map (buffer, &map, GST_MAP_WRITE);
This though is not has good, we usually always check the return value
of gst_buffer_map(). This case is particular, the buffer/memory has
just been allocated, it's not shared yet, so I don't see how this could
> memcpy (map.data + 0, "RIFF", 4);
> In my build of glib and gstreamer "gst_buffer_new_and_alloc" after
> all uses just libc's malloc call. Watched in the debugger.
> So, could you please help me to figure out, if that are bugs to be
> fixed, or I just don't understand (missed) something?
> С уважением,
> Слободенюк Александр Игоревич
> контактный телефон: +7-925-050-64-62
> gstreamer-devel mailing list
> [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel