jpegenc: check _alloc_buffer result and perform fallback alloc if needed
jpegenc: check _alloc_buffer result and perform fallback alloc if needed

... rather than carrying on with NULL buffer.

freedesktop-unofficial-mirror/gstreamer-sdk__gst-plugins-good,matsu/gst-plugins-good,matsu/gst-plugins-good,matsu/gst-plugins-good,matsu/gst-plugins-good,freedesktop-unofficial-mirror/gstreamer-sdk__gst-plugins-good,freedesktop-unofficial-mirror/gstreamer-sdk__gst-plugins-good,freedesktop-unofficial-mirror/gstreamer-sdk__gst-plugins-good