* not be fixed for reasons I did not inquire into, see
* http://www.mars.org/mailman/public/mad-dev/2001-May/000262.html
*/
- guard = gst_buffer_new_and_alloc (av + MAD_BUFFER_GUARD);
+ guard = g_malloc (av + MAD_BUFFER_GUARD);
/* let's be nice and not mess with baseclass state and keep hacks local */
- memset (GST_BUFFER_DATA (guard), 0, GST_BUFFER_SIZE (guard));
- memcpy (GST_BUFFER_DATA (guard), data, av);
- GST_DEBUG_OBJECT (mad, "added %u zero guard bytes in the adapter; "
+ memcpy (guard, data, av);
+ memset (guard + av, 0, MAD_BUFFER_GUARD);
+ GST_DEBUG_OBJECT (mad, "Added %u zero guard bytes in the adapter; "
"using fallback buffer of size %u",
- GST_BUFFER_SIZE (guard) - av, GST_BUFFER_SIZE (guard));
- data = GST_BUFFER_DATA (guard);
- av = GST_BUFFER_SIZE (guard);
+ MAD_BUFFER_GUARD, av + MAD_BUFFER_GUARD);
+ data = guard;
++ av = av + MAD_BUFFER_GUARD;
}
/* we basically let mad library do parsing,