mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
avcodec/parser: fill avctx dimensions if unset
This allows the usage of codecs in builds that have a parser but no decoders for remuxing scenarios with raw sources. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
7b2851b290
commit
0275d99427
1 changed files with 4 additions and 0 deletions
|
|
@ -166,6 +166,10 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||||
#define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name
|
#define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name
|
||||||
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
|
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||||
FILL(field_order);
|
FILL(field_order);
|
||||||
|
FILL(coded_width);
|
||||||
|
FILL(coded_height);
|
||||||
|
FILL(width);
|
||||||
|
FILL(height);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update the file pointer */
|
/* update the file pointer */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue