avformat/wavdec: check smv_frames_per_jpeg

Values outside would not be possible due to limitations of jpeg itself

Fixes very long running loop
Fixes Ticket2977

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>