1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avcodec/exr: read fps from metadata too

This commit is contained in:
Paul B Mahol 2021-02-15 17:26:13 +01:00
parent da857099e9
commit 98191135e0

View File

@ -1634,6 +1634,17 @@ static int decode_header(EXRContext *s, AVFrame *frame)
bytestream2_get_buffer(&s->gb, key, FFMIN(sizeof(key) - 1, var_size));
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;
}