diff options
author | James Almer <jamrial@gmail.com> | 2019-11-18 10:43:40 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-11-29 18:58:34 -0300 |
commit | 378065f08fbcbadf7c17bbd97b07c52692f1b471 (patch) | |
tree | db49aa0c72f88b31515345ef56eeed1f8aed67f3 /libavcodec/av1_parser.c | |
parent | 13ed2435940056a7b1f11b1f83069839a760cdbf (diff) | |
download | ffmpeg-378065f08fbcbadf7c17bbd97b07c52692f1b471.tar.gz |
avcodec/av1_parser: export stream dimensions in avctx
This is required to demux annexb samples when a decoder isn't available.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/av1_parser.c')
-rw-r--r-- | libavcodec/av1_parser.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 510cad987b..08721c356a 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -23,6 +23,7 @@ #include "av1_parse.h" #include "cbs.h" #include "cbs_av1.h" +#include "internal.h" #include "parser.h" typedef struct AV1ParseContext { @@ -155,6 +156,12 @@ static int av1_parser_parse(AVCodecParserContext *ctx, break; } av_assert2(ctx->format != AV_PIX_FMT_NONE); + + if (ctx->width != avctx->width || ctx->height != avctx->height) { + ret = ff_set_dimensions(avctx, ctx->width, ctx->height); + if (ret < 0) + goto end; + } } if (avctx->framerate.num) |