summaryrefslogtreecommitdiff
path: root/libavformat/argo_brp.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-09-18 17:43:42 +0200
committerPaul B Mahol <onemda@gmail.com>2020-09-27 09:56:13 +0200
commita3a6b56200e2899769175291837a178f20e1e95a (patch)
tree684eeea304c8d7f25837ba57d7e6fe6891a42229 /libavformat/argo_brp.c
parente575d59afe928af7729cc8abed94cc100c991444 (diff)
downloadffmpeg-a3a6b56200e2899769175291837a178f20e1e95a.tar.gz
avcodec: add Argonaut Games Video decoder
Diffstat (limited to 'libavformat/argo_brp.c')
-rw-r--r--libavformat/argo_brp.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/libavformat/argo_brp.c b/libavformat/argo_brp.c
index 76b4da2e66..fdc552af14 100644
--- a/libavformat/argo_brp.c
+++ b/libavformat/argo_brp.c
@@ -211,9 +211,7 @@ static int argo_brp_read_header(AVFormatContext *s)
ArgoBVIDHeader *bvid = &hdr->extradata.bvid;
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
-
- /* No decoder for this yet. */
- st->codecpar->codec_id = AV_CODEC_ID_NONE;
+ st->codecpar->codec_id = AV_CODEC_ID_ARGO;
bvid->num_frames = AV_RL32(buf + 0);
bvid->width = AV_RL32(buf + 4);
@@ -228,17 +226,8 @@ static int argo_brp_read_header(AVFormatContext *s)
st->codecpar->width = bvid->width;
st->codecpar->height = bvid->height;
-
- if (bvid->depth == 8) {
- st->codecpar->format = AV_PIX_FMT_PAL8;
- } else if (bvid->depth == 24) {
- st->codecpar->format = AV_PIX_FMT_RGB24;
- } else {
- avpriv_request_sample(s, "depth == %u", bvid->depth);
- return AVERROR_PATCHWELCOME;
- }
-
st->nb_frames = bvid->num_frames;
+ st->codecpar->bits_per_raw_sample = bvid->depth;
} else if (hdr->codec_id == BRP_CODEC_ID_BASF) {
/*
* It would make the demuxer significantly more complicated