Commit 68e547ae authored by Anton Khirnov's avatar Anton Khirnov

avpacket: use ERANGE instead of EOVERFLOW

EOVERFLOW seems to be unavailable on certain platforms.
parent d5f5c90b
...@@ -243,7 +243,7 @@ int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type, ...@@ -243,7 +243,7 @@ int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
int elems = pkt->side_data_elems; int elems = pkt->side_data_elems;
if ((unsigned)elems + 1 > INT_MAX / sizeof(*pkt->side_data)) if ((unsigned)elems + 1 > INT_MAX / sizeof(*pkt->side_data))
return AVERROR(EOVERFLOW); return AVERROR(ERANGE);
pkt->side_data = av_realloc(pkt->side_data, pkt->side_data = av_realloc(pkt->side_data,
(elems + 1) * sizeof(*pkt->side_data)); (elems + 1) * sizeof(*pkt->side_data));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment