diff options
author | Zane van Iperen <zane@zanevaniperen.com> | 2020-09-25 23:03:46 +1000 |
---|---|---|
committer | Zane van Iperen <zane@zanevaniperen.com> | 2020-09-27 09:11:29 +1000 |
commit | ebfed56858d5fc57f0b4bad7e08e9e89258702ba (patch) | |
tree | fa9a43eaf4fc016a9479aaf772681a5fd99af769 /libavformat/argo_asf.c | |
parent | ff5fcd0be02cc379ed5cfa3075d4d65c8c3da81f (diff) | |
download | ffmpeg-ebfed56858d5fc57f0b4bad7e08e9e89258702ba.tar.gz |
avformat/argo_{asf,brp}: fix potential segfault in ff_argo_asf_fill_stream()
Signed-off-by: Zane van Iperen <zane@zanevaniperen.com>
Diffstat (limited to 'libavformat/argo_asf.c')
-rw-r--r-- | libavformat/argo_asf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/argo_asf.c b/libavformat/argo_asf.c index de941caeac..8e2bf21c71 100644 --- a/libavformat/argo_asf.c +++ b/libavformat/argo_asf.c @@ -75,17 +75,17 @@ void ff_argo_asf_parse_chunk_header(ArgoASFChunkHeader *hdr, const uint8_t *buf) hdr->flags = AV_RL32(buf + 16); } -int ff_argo_asf_fill_stream(AVStream *st, const ArgoASFFileHeader *fhdr, +int ff_argo_asf_fill_stream(AVFormatContext *s, AVStream *st, const ArgoASFFileHeader *fhdr, const ArgoASFChunkHeader *ckhdr) { if (ckhdr->num_samples != ASF_SAMPLE_COUNT) { - av_log(st, AV_LOG_ERROR, "Invalid sample count. Got %u, expected %d\n", + av_log(s, AV_LOG_ERROR, "Invalid sample count. Got %u, expected %d\n", ckhdr->num_samples, ASF_SAMPLE_COUNT); return AVERROR_INVALIDDATA; } if ((ckhdr->flags & ASF_CF_ALWAYS1) != ASF_CF_ALWAYS1 || (ckhdr->flags & ASF_CF_ALWAYS0) != 0) { - avpriv_request_sample(st, "Nonstandard flags (0x%08X)", ckhdr->flags); + avpriv_request_sample(s, "Nonstandard flags (0x%08X)", ckhdr->flags); return AVERROR_PATCHWELCOME; } @@ -116,7 +116,7 @@ int ff_argo_asf_fill_stream(AVStream *st, const ArgoASFFileHeader *fhdr, if (st->codecpar->bits_per_raw_sample != 16) { /* The header allows for these, but I've never seen any files with them. */ - avpriv_request_sample(st, "Non 16-bit samples"); + avpriv_request_sample(s, "Non 16-bit samples"); return AVERROR_PATCHWELCOME; } @@ -212,7 +212,7 @@ static int argo_asf_read_header(AVFormatContext *s) ff_argo_asf_parse_chunk_header(&asf->ckhdr, buf); - return ff_argo_asf_fill_stream(st, &asf->fhdr, &asf->ckhdr); + return ff_argo_asf_fill_stream(s, st, &asf->fhdr, &asf->ckhdr); } static int argo_asf_read_packet(AVFormatContext *s, AVPacket *pkt) |