1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avcodec/tiff: respect side data preference

This commit is contained in:
Niklas Haas
2024-02-17 21:53:07 +01:00
committed by Anton Khirnov
parent 454691a2ec
commit 276be6da9e

View File

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