aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/exr.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-02-15 17:26:13 +0100
committerPaul B Mahol <onemda@gmail.com>2021-02-15 17:39:35 +0100
commit98191135e03afe1de566c9d6a0eb3e3f9010cade (patch)
tree5c07b5bbd86dc6348db65e732bbda4fb31a76528 /libavcodec/exr.c
parentda857099e92fb7fede6d7b9e6b26879ce9c5a483 (diff)
downloadffmpeg-98191135e03afe1de566c9d6a0eb3e3f9010cade.tar.gz
avcodec/exr: read fps from metadata too
Diffstat (limited to 'libavcodec/exr.c')
-rw-r--r--libavcodec/exr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index 6e6ce4275c..ef14bfd69a 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -1635,6 +1635,17 @@ static int decode_header(EXRContext *s, AVFrame *frame)
av_dict_set(&metadata, "writer", key, 0);
continue;
+ } else if ((var_size = check_header_variable(s, "framesPerSecond",
+ "rational", 33)) >= 0) {
+ if (!var_size) {
+ ret = AVERROR_INVALIDDATA;
+ goto fail;
+ }
+
+ s->avctx->framerate.num = bytestream2_get_le32(&s->gb);
+ s->avctx->framerate.den = bytestream2_get_le32(&s->gb);
+
+ continue;
}
// Check if there are enough bytes for a header