avcodec/exif: do not follow 0 offsets

Fixes exif decoding failure of 1295328_300.jpg

Reviewed-by; Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/66/head
Michael Niedermayer 11 years ago
parent a94de50ba0
commit e70b9b32d5
  1. 5
      libavcodec/exif.c

@ -78,6 +78,11 @@ static int exif_decode_tag(AVCodecContext *avctx, GetByteContext *gbytes, int le
ff_tread_tag(gbytes, le, &id, &type, &count, &cur_pos);
if (!bytestream2_tell(gbytes)) {
bytestream2_seek(gbytes, cur_pos, SEEK_SET);
return 0;
}
// read count values and add it metadata
// store metadata or proceed with next IFD
ret = ff_tis_ifd(id);

Loading…
Cancel
Save