[FFmpeg-cvslog] mjpeg: Do not fail jpeg decoding on bad EXIF data.

Justin Ruggles git at videolan.org
Fri Apr 18 18:41:48 CEST 2014


ffmpeg | branch: master | Justin Ruggles <justin.ruggles at gmail.com> | Thu Apr 17 18:09:46 2014 -0400| [39ef000e19b556196e829c6eeec46b65a77bc385] | committer: Derek Buitenhuis

mjpeg: Do not fail jpeg decoding on bad EXIF data.

It is not required to correctly decode the image.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=39ef000e19b556196e829c6eeec46b65a77bc385
---

 libavcodec/mjpegdec.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6a93f4a..722d1bc 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1665,9 +1665,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
         ret = ff_tdecode_header(&gbytes, &le, &ifd_offset);
         if (ret) {
             av_log(s->avctx, AV_LOG_ERROR, "mjpeg: invalid TIFF header in EXIF data\n");
-            return ret;
-        }
-
+        } else {
         bytestream2_seek(&gbytes, ifd_offset, SEEK_SET);
 
         // read 0th IFD and store the metadata
@@ -1675,7 +1673,7 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
         ret = avpriv_exif_decode_ifd(s->avctx, &gbytes, le, 0, &s->exif_metadata);
         if (ret < 0) {
             av_log(s->avctx, AV_LOG_ERROR, "mjpeg: error decoding EXIF data\n");
-            return ret;
+        }
         }
 
         bytes_read = bytestream2_tell(&gbytes);



More information about the ffmpeg-cvslog mailing list