Mercurial > libavcodec.hg
comparison mjpegdec.c @ 9914:e1aaf6216769 libavcodec
Make the MJPEG decoder return -1 when no image was decoded so that decode
errors are actually recognizable as such.
author | reimar |
---|---|
date | Sat, 04 Jul 2009 18:22:33 +0000 |
parents | b73796e93571 |
children | f1707434e40b |
comparison
equal
deleted
inserted
replaced
9913:b73796e93571 | 9914:e1aaf6216769 |
---|---|
1477 av_log(avctx, AV_LOG_DEBUG, "marker parser used %d bytes (%d bits)\n", | 1477 av_log(avctx, AV_LOG_DEBUG, "marker parser used %d bytes (%d bits)\n", |
1478 (get_bits_count(&s->gb)+7)/8, get_bits_count(&s->gb)); | 1478 (get_bits_count(&s->gb)+7)/8, get_bits_count(&s->gb)); |
1479 } | 1479 } |
1480 } | 1480 } |
1481 } | 1481 } |
1482 av_log(avctx, AV_LOG_FATAL, "No JPEG data found in image\n"); | |
1483 return -1; | |
1482 the_end: | 1484 the_end: |
1483 av_log(avctx, AV_LOG_DEBUG, "mjpeg decode frame unused %td bytes\n", buf_end - buf_ptr); | 1485 av_log(avctx, AV_LOG_DEBUG, "mjpeg decode frame unused %td bytes\n", buf_end - buf_ptr); |
1484 // return buf_end - buf_ptr; | 1486 // return buf_end - buf_ptr; |
1485 return buf_ptr - buf; | 1487 return buf_ptr - buf; |
1486 } | 1488 } |