mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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>
This commit is contained in:
parent
13ed243594
commit
378065f08f
@ -23,6 +23,7 @@
|
|||||||
#include "av1_parse.h"
|
#include "av1_parse.h"
|
||||||
#include "cbs.h"
|
#include "cbs.h"
|
||||||
#include "cbs_av1.h"
|
#include "cbs_av1.h"
|
||||||
|
#include "internal.h"
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
typedef struct AV1ParseContext {
|
typedef struct AV1ParseContext {
|
||||||
@ -155,6 +156,12 @@ static int av1_parser_parse(AVCodecParserContext *ctx,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
av_assert2(ctx->format != AV_PIX_FMT_NONE);
|
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)
|
if (avctx->framerate.num)
|
||||||
|
Loading…
Reference in New Issue
Block a user