History

avcodec/tiff: respect side data preference

Niklas Haas committed 2 years ago

Commit 276be6d1 parent 454691a1 file · +5 −5Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/tiff.c+5−5
@@ -1706,11 +1706,11 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) · 1705 unmodified lines
17061706 if (bytestream2_get_bytes_left(&gb_temp) < count)
17071707 return AVERROR_INVALIDDATA;
17081708
1709− sd = av_frame_new_side_data(frame, AV_FRAME_DATA_ICC_PROFILE, count);
1710− if (!sd)
1711− return AVERROR(ENOMEM);
1712−
1713− bytestream2_get_bufferu(&gb_temp, sd->data, count);
1709+ ret = ff_frame_new_side_data(s->avctx, frame, AV_FRAME_DATA_ICC_PROFILE, count, &sd);
1710+ if (ret < 0)
1711+ return ret;
1712+ if (sd)
1713+ bytestream2_get_bufferu(&gb_temp, sd->data, count);
17141714 break;
17151715 case TIFF_ARTIST:
17161716 ADD_METADATA(count, "artist", NULL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t