libstagefright: fix indefinate loop in QueryCodec