]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/mxpegdec.c
avcodec/mjpegdec: postpone calling ff_get_buffer() until the SOS marker
[ffmpeg] / libavcodec / mxpegdec.c
index 763ce5871dfeef4ae050a4d934b4eee3551a2603..617da52cf0a690239dfc4f096847128a4871d76d 100644 (file)
@@ -197,7 +197,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
     buf_end = buf + buf_size;
     jpg->got_picture = 0;
     s->got_mxm_bitmask = 0;
-    s->got_sof_data = !!s->got_sof_data;
+    jpg->seen_sof = s->got_sof_data = !!s->got_sof_data;
     while (buf_ptr < buf_end) {
         start_code = ff_mjpeg_find_marker(jpg, &buf_ptr, buf_end,
                                           &unescaped_buf_ptr, &unescaped_buf_size);