avpacket: use ERANGE instead of EOVERFLOW
authorAnton Khirnov <anton@khirnov.net>
Sun, 6 Dec 2015 09:59:51 +0000 (10:59 +0100)
committerAnton Khirnov <anton@khirnov.net>
Mon, 7 Dec 2015 10:42:26 +0000 (11:42 +0100)
EOVERFLOW seems to be unavailable on certain platforms.

libavcodec/avpacket.c

index f8268b9..87454d5 100644 (file)
@@ -243,7 +243,7 @@ int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
     int elems = pkt->side_data_elems;
 
     if ((unsigned)elems + 1 > INT_MAX / sizeof(*pkt->side_data))
-        return AVERROR(EOVERFLOW);
+        return AVERROR(ERANGE);
 
     pkt->side_data = av_realloc(pkt->side_data,
                                 (elems + 1) * sizeof(*pkt->side_data));