smvjpegdec: make sure cur_frame is not negative