v4l2videoenc: workaround for sink pool dequeue race condition

Sink pool dequeue and finish frame has race condition.
Unref input buffer in chain thread to avoid it.

https://bugzilla.gnome.org/show_bug.cgi?id=752962

UpStream Status: Pending

Signed-off-by: Song Bing <bing.song@nxp.com>
diff --git a/sys/v4l2/gstv4l2videoenc.c b/sys/v4l2/gstv4l2videoenc.c
index 7e88923..44f1605 100644
--- a/sys/v4l2/gstv4l2videoenc.c
+++ b/sys/v4l2/gstv4l2videoenc.c
@@ -772,6 +772,8 @@
   }
 
   gst_video_codec_frame_unref (frame);
+  gst_buffer_unref (frame->input_buffer);
+  frame->input_buffer = NULL;
   return ret;
 
   /* ERRORS */