|
|
|
@ -1666,14 +1666,14 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) |
|
|
|
|
if (ret) { |
|
|
|
|
av_log(s->avctx, AV_LOG_ERROR, "mjpeg: invalid TIFF header in EXIF data\n"); |
|
|
|
|
} else { |
|
|
|
|
bytestream2_seek(&gbytes, ifd_offset, SEEK_SET); |
|
|
|
|
bytestream2_seek(&gbytes, ifd_offset, SEEK_SET); |
|
|
|
|
|
|
|
|
|
// read 0th IFD and store the metadata
|
|
|
|
|
// (return values > 0 indicate the presence of subimage metadata)
|
|
|
|
|
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"); |
|
|
|
|
} |
|
|
|
|
// read 0th IFD and store the metadata
|
|
|
|
|
// (return values > 0 indicate the presence of subimage metadata)
|
|
|
|
|
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"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bytes_read = bytestream2_tell(&gbytes); |
|
|
|
|