decoder: h264: fix submission of AVC_REF_IDX_STATE command.
If the RefPicListX[] entry has no valid picture_id associated to it,
then set the resulting state to 0xff. If that entry has no surface
buffer storage either, then compose a valid state that maps to the
first item in the reference frames list, as mandated by the PRM.
v2: dropped the superfluous "found" variable [Yakui]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit
151b8851c3a9309e87712651a3697e20a7bdb6c9)