X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavformat%2Fapc.c;h=7210bfbb563d1053d6b405c4964fec234d3c7a1c;hb=0bf3a7361d17d596a5044882098f56817db0e103;hp=b180a50c9bd01e20476b2a12bd7e39793baede8d;hpb=f4cf6ba8c9646814af842a99335c6ee312ded299;p=ffmpeg diff --git a/libavformat/apc.c b/libavformat/apc.c index b180a50c9bd..7210bfbb563 100644 --- a/libavformat/apc.c +++ b/libavformat/apc.c @@ -25,7 +25,7 @@ #include "avformat.h" #include "internal.h" -static int apc_probe(AVProbeData *p) +static int apc_probe(const AVProbeData *p) { if (!strncmp(p->buf, "CRYO_APC", 8)) return AVPROBE_SCORE_MAX; @@ -37,6 +37,7 @@ static int apc_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; AVStream *st; + int ret; avio_rl32(pb); /* CRYO */ avio_rl32(pb); /* _APC */ @@ -53,8 +54,8 @@ static int apc_read_header(AVFormatContext *s) st->codecpar->sample_rate = avio_rl32(pb); /* initial predictor values for adpcm decoder */ - if (ff_get_extradata(s, st->codecpar, pb, 2 * 4) < 0) - return AVERROR(ENOMEM); + if ((ret = ff_get_extradata(s, st->codecpar, pb, 2 * 4)) < 0) + return ret; if (avio_rl32(pb)) { st->codecpar->channels = 2; @@ -78,7 +79,6 @@ static int apc_read_packet(AVFormatContext *s, AVPacket *pkt) { if (av_get_packet(s->pb, pkt, MAX_READ_SIZE) <= 0) return AVERROR(EIO); - pkt->flags &= ~AV_PKT_FLAG_CORRUPT; pkt->stream_index = 0; return 0; }