}
val = -1;
found:
-#ifdef DEBUG
- av_log(NULL, AV_LOG_VERBOSE, "find_marker skipped %d bytes\n", skipped);
-#endif
+ dprintf(NULL, "find_marker skipped %d bytes\n", skipped);
*pbuf_ptr = buf_ptr;
return val;
}
}
break;
case SOF0:
+ case SOF1:
s->lossless=0;
s->ls=0;
s->progressive=0;
case DRI:
mjpeg_decode_dri(s);
break;
- case SOF1:
case SOF5:
case SOF6:
case SOF7:
}
}
}
+ if (s->got_picture) {
+ av_log(avctx, AV_LOG_WARNING, "EOI missing, emulating\n");
+ goto eoi_parser;
+ }
+ av_log(avctx, AV_LOG_FATAL, "No JPEG data found in image\n");
+ return -1;
the_end:
av_log(avctx, AV_LOG_DEBUG, "mjpeg decode frame unused %td bytes\n", buf_end - buf_ptr);
// return buf_end - buf_ptr;
MJpegDecodeContext *s = avctx->priv_data;
int i, j;
+ if (s->picture.data[0])
+ avctx->release_buffer(avctx, &s->picture);
+
av_free(s->buffer);
av_free(s->qscale_table);