Let X be a smooth projective curve over an algebraically closed field of characteristic >2. Consider the dual pair H=GSO_{2m}, G=GSp_{2n} over X, where H splits over an etale two-sheeted covering of X. Write Bun_G and Bun_H for the stacks of G-torsors and H-torsors on X. We show that for mle n (respectively, for m>n) the theta-lifting functor from D(Bun_H) to D(Bun_G) (respectively, from D(Bun_G) to D(Bun_H)) commutes with Hecke functors with respect to a morphism of the corresponding L-groups involving the SL_2 of Arthur. So, they realize the geometric Langlands functoriality for the corresponding morphisms of L-groups. As an application, we prove a particular case of the geometric Langlands conjectures for GSp_4. Namely, we construct the automorphic Hecke eigensheaves on Bun_{GSp_4} corresponding to the endoscopic local systems on X.