vaapiencode: fix memory leaks in _push_frame() on error.
vaapiencode: fix memory leaks in _push_frame() on error.

Simplify gst_vaapiencode_push_frame(), while also removing the call
to gst_video_encoder_negotiate() since this is implicit in _finish()
if caps changed. Also fixed memory leaks that occured on error.

gbeauchesne/gstreamer-vaapi,CapOM/gstreamer-vaapi,GStreamer/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,CapOM/gstreamer-vaapi,ceyusa/gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,CapOM/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,GStreamer/gstreamer-vaapi,ceyusa/gstreamer-vaapi