Commit 4c14a252 authored by Haihao Xiang's avatar Haihao Xiang Committed by Michael Niedermayer

lavc/hevc: Don't parse NAL unit for a dummy buffer

hevc parser mistakenly reports the following message if a dummy buffer
is padded for EOF

   [hevc @ 0x559b63848610] missing picture in access unit
Signed-off-by: 's avatarHaihao Xiang <haihao.xiang@intel.com>
Reviewed-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
Reviewed-by: 's avatar"Li, Zhong" <zhong.li@intel.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent b5771532
......@@ -294,6 +294,8 @@ static int hevc_parse(AVCodecParserContext *s, AVCodecContext *avctx,
int next;
HEVCParserContext *ctx = s->priv_data;
ParseContext *pc = &ctx->pc;
int is_dummy_buf = !buf_size;
const uint8_t *dummy_buf = buf;
if (avctx->extradata && !ctx->parsed_extradata) {
ff_hevc_decode_extradata(avctx->extradata, avctx->extradata_size, &ctx->ps, &ctx->sei,
......@@ -313,7 +315,10 @@ static int hevc_parse(AVCodecParserContext *s, AVCodecContext *avctx,
}
}
parse_nal_units(s, buf, buf_size, avctx);
is_dummy_buf = (is_dummy_buf && (dummy_buf == buf));
if (!is_dummy_buf)
parse_nal_units(s, buf, buf_size, avctx);
*poutbuf = buf;
*poutbuf_size = buf_size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment