avcodec/mjpegdec: Fix context fields becoming inconsistent