X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fidroqdec.c;h=16aa2a146e273b7e5ab0f0901ecef767c2e45ba9;hb=343ccfcc4deb2257e1525f05284e6343816a91cc;hp=8fd67a6818b37c0c0742bb57e3603100948b41a0;hpb=d6b62ce1aced9e2456582870382f384581cc7cbb;p=ffmpeg diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c index 8fd67a6818b..16aa2a146e2 100644 --- a/libavformat/idroqdec.c +++ b/libavformat/idroqdec.c @@ -59,7 +59,7 @@ typedef struct RoqDemuxContext { } RoqDemuxContext; -static int roq_probe(AVProbeData *p) +static int roq_probe(const AVProbeData *p) { if ((AV_RL16(&p->buf[0]) != RoQ_MAGIC_NUMBER) || (AV_RL32(&p->buf[2]) != 0xFFFFFFFF)) @@ -205,8 +205,9 @@ static int roq_read_packet(AVFormatContext *s, } /* load up the packet */ - if (av_new_packet(pkt, chunk_size + RoQ_CHUNK_PREAMBLE_SIZE)) - return AVERROR(EIO); + ret = av_new_packet(pkt, chunk_size + RoQ_CHUNK_PREAMBLE_SIZE); + if (ret < 0) + return ret; /* copy over preamble */ memcpy(pkt->data, preamble, RoQ_CHUNK_PREAMBLE_SIZE);