GNOME Bugzilla – Bug 687192
dvdsubdec: allocates buffer 4 times the size needed
Last modified: 2012-10-30 13:20:17 UTC
i've noticed that the buffers that dvdsubdec generates were 6635520 bytes each. /GstPipeline:pipeline0/GstDvdSubDec:dvdsubdec0.GstPad:src: caps = video/x-raw, format=(string)ARGB, width=(int)720, height=(int)576, framerate=(fraction)0/1 that's 4 times the expected size of a PAL sized ARGB bitmap of 720*576*4 = 1658880 i suspect a bug which was introduced during porting to new api the original allocation line was: gst_pad_alloc_buffer_and_set_caps (dec->srcpad, 0, 4 * dec->in_width * dec->in_height, GST_PAD_CAPS (dec->srcpad), &out_buf); while the new one uses: out_buf = gst_buffer_new_allocate (NULL, 4 * GST_VIDEO_INFO_SIZE (&dec->info), ¶ms); with a macro which i don't know yet but it's obviously already considering the bit depth per pixel, so that the extra 4 * results in a buffer that's 128bpp instead of 32bpp. propsed fix to be attached.
Created attachment 227634 [details] [review] dvdsubdec: allocate correct amount of memory for bitmap
Review of attachment 227634 [details] [review]: Seems sensible
commit e5495e7f676c010b86d87a9a7397b9986b88a0bb Author: Andreas Frisch <fraxinas@opendreambox.org> Date: Tue Oct 30 13:39:52 2012 +0100 dvdsubdec: allocate correct amount of memory for bitmap https://bugzilla.gnome.org/show_bug.cgi?id=687192