basetransform: refactor metadata modifications
basetransform: refactor metadata modifications

Check when we need to touch the metadata of the output buffer after selecting
the output buffer so that we have everything in one place.
Also take flags and timestamp modifications into account.

collects/gstreamer,Lachann/gstreamer,jpxiong/gstreamer,mparis/gstreamer,mparis/gstreamer,magcius/gstreamer,shelsonjava/gstreamer,cablelabs/gstreamer,lubosz/gstreamer,Distrotech/gstreamer,centricular/gstreamer,shelsonjava/gstreamer,collects/gstreamer,justinjoy/gstreamer,mparis/gstreamer,justinjoy/gstreamer,ylatuya/gstreamer,lubosz/gstreamer,justinjoy/gstreamer,centricular/gstreamer,cfoch/gstreamer,jpakkane/gstreamer,krieger-od/gstreamer,shelsonjava/gstreamer,magcius/gstreamer,krichter722/gstreamer,krieger-od/gstreamer,surround-io/gstreamer,ylatuya/gstreamer,mrchapp/gstreamer,jpxiong/gstreamer,krichter722/gstreamer,surround-io/gstreamer,Lachann/gstreamer,ahmedammar/platform_external_gst_gstreamer,shelsonjava/gstreamer,drothlis/gstreamer,mrchapp/gstreamer,centricular/gstreamer,Distrotech/gstreamer,StreamUtils/gstreamer,ensonic/gstreamer,justinjoy/gstreamer,lovebug356/gstreamer,cablelabs/gstreamer,lovebug356/gstreamer,drothlis/gstreamer,StreamUtils/gstreamer,cablelabs/gstreamer,krichter722/gstreamer,ylatuya/gstreamer,cfoch/gstreamer,ahmedammar/platform_external_gst_gstreamer,magcius/gstreamer,mparis/gstreamer,ahmedammar/platform_external_gst_gstreamer,jpxiong/gstreamer,Distrotech/gstreamer,ensonic/gstreamer,krieger-od/gstreamer,jpxiong/gstreamer,cablelabs/gstreamer,krichter722/gstreamer,jpakkane/gstreamer,surround-io/gstreamer,krichter722/gstreamer,cfoch/gstreamer,collects/gstreamer,krieger-od/gstreamer,ahmedammar/platform_external_gst_gstreamer,StreamUtils/gstreamer,lovebug356/gstreamer,cfoch/gstreamer,collects/gstreamer,surround-io/gstreamer,lovebug356/gstreamer,mparis/gstreamer,justinjoy/gstreamer,lubosz/gstreamer,krieger-od/gstreamer,cfoch/gstreamer,ylatuya/gstreamer,magcius/gstreamer,jpxiong/gstreamer,mrchapp/gstreamer,centricular/gstreamer,mrchapp/gstreamer,jpakkane/gstreamer,ensonic/gstreamer,Distrotech/gstreamer,cablelabs/gstreamer,centricular/gstreamer,shelsonjava/gstreamer,ensonic/gstreamer,jpakkane/gstreamer,Distrotech/gstreamer,ensonic/gstreamer,mrchapp/gstreamer,ahmedammar/platform_external_gst_gstreamer,lovebug356/gstreamer,magcius/gstreamer,lubosz/gstreamer,Lachann/gstreamer,drothlis/gstreamer,lubosz/gstreamer,Lachann/gstreamer,Lachann/gstreamer,StreamUtils/gstreamer,drothlis/gstreamer,jpakkane/gstreamer,drothlis/gstreamer,collects/gstreamer,ylatuya/gstreamer,surround-io/gstreamer,StreamUtils/gstreamer