Use the bufalloc() routine from libmjpegutils (utils/cpu_accel.c). Not only
does this prevent needless code duplication but the pointer from mjpegutil's
bufalloc() can be passed to free() (the one returned by duplicate code could
not be passed to free()).