summaryrefslogtreecommitdiffstats
path: root/libavcodec/libdav1d.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2019-05-27 12:47:33 -0300
committerJames Almer <jamrial@gmail.com>2019-05-27 12:47:33 -0300
commit0e07b767c86cc23c7a959e2b39fadd2088049f94 (patch)
tree054dc7e1bc67789a715e9daca38fd3ec6c445e01 /libavcodec/libdav1d.c
parent293489d8355a3c6e3485eb7d621cd64af80b7bf5 (diff)
downloadffmpeg-streaming-0e07b767c86cc23c7a959e2b39fadd2088049f94.zip
ffmpeg-streaming-0e07b767c86cc23c7a959e2b39fadd2088049f94.tar.gz
avcodec/libdav1d: export level from the Sequence Header
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/libdav1d.c')
-rw-r--r--libavcodec/libdav1d.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 4fa3b0a..541d56d 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -223,6 +223,8 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
frame->linesize[2] = p->stride[1];
c->profile = p->seq_hdr->profile;
+ c->level = ((p->seq_hdr->operating_points[0].major_level - 2) << 2)
+ | p->seq_hdr->operating_points[0].minor_level;
frame->format = c->pix_fmt = pix_fmt[p->p.layout][p->seq_hdr->hbd];
frame->width = p->p.w;
frame->height = p->p.h;
OpenPOWER on IntegriCloud