X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsdr2.c;h=8893f260d2fe09b684b89aad824bec8853ac6007;hb=d580c7a7979613f352cfc9701f7ff4fe83b33af2;hp=50abdf9397c1d9e9d6b18c56dbc30c65eb191479;hpb=0084eed5bffebd7f3915bc0f9eba7350e8bc0ef7;p=ffmpeg diff --git a/libavformat/sdr2.c b/libavformat/sdr2.c index 50abdf9397c..8893f260d2f 100644 --- a/libavformat/sdr2.c +++ b/libavformat/sdr2.c @@ -90,8 +90,8 @@ static int sdr2_read_packet(AVFormatContext *s, AVPacket *pkt) avio_skip(s->pb, 30); if (pos == FIRST) { - if (av_new_packet(pkt, next - 52 + 24) < 0) - return AVERROR(ENOMEM); + if ((ret = av_new_packet(pkt, next - 52 + 24)) < 0) + return ret; memcpy(pkt->data, header, 24); ret = avio_read(s->pb, pkt->data + 24, next - 52); if (ret < 0) {