X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fsdr2.c;h=8893f260d2fe09b684b89aad824bec8853ac6007;hb=32bc0e04449e3e1e8e283f8edac4a796ee29e6b6;hp=c9953336c5a48f4e03f4b3844214f4b61a180a0f;hpb=7167ac33a8f2c7d063384c267f984f23d2b73854;p=ffmpeg diff --git a/libavformat/sdr2.c b/libavformat/sdr2.c index c9953336c5a..8893f260d2f 100644 --- a/libavformat/sdr2.c +++ b/libavformat/sdr2.c @@ -23,7 +23,7 @@ #include "avformat.h" #include "internal.h" -static int sdr2_probe(AVProbeData *p) +static int sdr2_probe(const AVProbeData *p) { if (AV_RL32(p->buf) != MKTAG('S', 'R', 'A', 1)) return 0; @@ -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) {