aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2024-02-17 21:53:07 +0100
committerAnton Khirnov <anton@khirnov.net>2024-03-08 07:37:56 +0100
commit276be6da9edbf820717448abbdcfaed6f5e19641 (patch)
tree982586b20fbeff10c8abce25483c753c56346c51
parent454691a2ec35cbcb6a489b089e1c5957d65cdcab (diff)
downloadffmpeg-276be6da9edbf820717448abbdcfaed6f5e19641.tar.gz
avcodec/tiff: respect side data preference
-rw-r--r--libavcodec/tiff.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 71cb703821..cb4d378753 100644
--- a/libavcodec/tiff.c
+++ b/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);