avcodec/tiff: respect side data preference

release/7.0
Niklas Haas 1 year ago committed by Anton Khirnov
parent 454691a2ec
commit 276be6da9e
  1. 10
      libavcodec/tiff.c

@ -1706,11 +1706,11 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame)
if (bytestream2_get_bytes_left(&gb_temp) < count)
return AVERROR_INVALIDDATA;
sd = av_frame_new_side_data(frame, AV_FRAME_DATA_ICC_PROFILE, count);
if (!sd)
return AVERROR(ENOMEM);
bytestream2_get_bufferu(&gb_temp, sd->data, count);
ret = ff_frame_new_side_data(s->avctx, frame, AV_FRAME_DATA_ICC_PROFILE, count, &sd);
if (ret < 0)
return ret;
if (sd)
bytestream2_get_bufferu(&gb_temp, sd->data, count);
break;
case TIFF_ARTIST:
ADD_METADATA(count, "artist", NULL);

Loading…
Cancel
Save