vaapidecode: Always keep a copy of input codec state
vaapidecode: Always keep a copy of input codec state

Currently we are sharing the input GstVideoCodecState with
GstVaapiDecoder(gst-libs/gst/vaapi) by just doing ref and unref for
each caps change. This is troublesome in many cases, for eg: if
resoultion changes with in a singe stream. Because, when ever there
is a resolution change, GstVideoDecoder will first change the Codec_state->caps
fields with new resolution, but since we are using the same codecstate (ref)
in gstvaapidecode.c, the caps check for input caps change will always fail.

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

gbeauchesne/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi