Move iv_decode_frame function to remove a forward declaration.