lavc/parser: export field order if not already set

Some codecs set this in the parser, but not the decoder
This commit is contained in:
Rodger Combs 2016-09-20 05:57:39 -05:00
parent 58672347cb
commit d13740f3a2
No known key found for this signature in database
GPG Key ID: E3E54DCDCD3CB843
1 changed files with 5 additions and 0 deletions

View File

@ -182,6 +182,11 @@ int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx,
index = s->parser->parser_parse(s, avctx, (const uint8_t **) poutbuf,
poutbuf_size, buf, buf_size);
av_assert0(index > -0x20000000); // The API does not allow returning AVERROR codes
#define FILL(name) if(s->name > 0 && avctx->name <= 0) avctx->name = s->name
if (avctx->codec_type == AVMEDIA_TYPE_VIDEO) {
FILL(field_order);
}
/* update the file pointer */
if (*poutbuf_size) {
/* fill the data for the current frame */