[FFmpeg-cvslog] lavc/hevc: Don't parse NAL unit for a dummy buffer
Haihao Xiang
git at videolan.org
Sun Sep 30 21:43:36 EEST 2018
ffmpeg | branch: master | Haihao Xiang <haihao.xiang at intel.com> | Fri Mar 30 10:42:32 2018 +0800| [4c14a25281bb496092e2a6f930e4f1f9e900514f] | committer: 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: Haihao Xiang <haihao.xiang at intel.com>
Reviewed-by: Steven Liu <lq at chinaffmpeg.org>
Reviewed-by: "Li, Zhong" <zhong.li at intel.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c14a25281bb496092e2a6f930e4f1f9e900514f
---
libavcodec/hevc_parser.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavcodec/hevc_parser.c b/libavcodec/hevc_parser.c
index a468682ed3..01418b276d 100644
--- a/libavcodec/hevc_parser.c
+++ b/libavcodec/hevc_parser.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list