Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1706,11 +1706,11 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) · 1705 unmodified lines | ||
| 1706 | 1706 | if (bytestream2_get_bytes_left(&gb_temp) < count) |
| 1707 | 1707 | return AVERROR_INVALIDDATA; |
| 1708 | 1708 | |
| 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); | |
| 1714 | 1714 | break; |
| 1715 | 1715 | case TIFF_ARTIST: |
| 1716 | 1716 | ADD_METADATA(count, "artist", NULL); |