@ -2288,6 +2288,10 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
break ;
case SOF0 :
case SOF1 :
if ( start_code = = SOF0 )
s - > avctx - > profile = FF_PROFILE_MJPEG_HUFFMAN_BASELINE_DCT ;
else
s - > avctx - > profile = FF_PROFILE_MJPEG_HUFFMAN_EXTENDED_SEQUENTIAL_DCT ;
s - > lossless = 0 ;
s - > ls = 0 ;
s - > progressive = 0 ;
@ -2295,6 +2299,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
goto fail ;
break ;
case SOF2 :
s - > avctx - > profile = FF_PROFILE_MJPEG_HUFFMAN_PROGRESSIVE_DCT ;
s - > lossless = 0 ;
s - > ls = 0 ;
s - > progressive = 1 ;
@ -2302,6 +2307,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
goto fail ;
break ;
case SOF3 :
s - > avctx - > profile = FF_PROFILE_MJPEG_HUFFMAN_LOSSLESS ;
s - > avctx - > properties | = FF_CODEC_PROPERTY_LOSSLESS ;
s - > lossless = 1 ;
s - > ls = 0 ;
@ -2310,6 +2316,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
goto fail ;
break ;
case SOF48 :
s - > avctx - > profile = FF_PROFILE_MJPEG_JPEG_LS ;
s - > avctx - > properties | = FF_CODEC_PROPERTY_LOSSLESS ;
s - > lossless = 1 ;
s - > ls = 1 ;