Browse Source

avcodec/h2645_parse: skip NALUs with no content after stripping all the trailing zeros

The GetBitContext is effectively empty in them.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 9a09f4c54a)
tags/n4.0.3
James Almer Aman Gupta 7 years ago
parent
commit
967604fecf
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/h2645_parse.c

+ 1
- 1
libavcodec/h2645_parse.c View File

@@ -371,7 +371,7 @@ int ff_h2645_packet_split(H2645Packet *pkt, const uint8_t *buf, int length,
ret = hevc_parse_nal_header(nal, logctx);
else
ret = h264_parse_nal_header(nal, logctx);
if (ret <= 0 || nal->size <= 0) {
if (ret <= 0 || nal->size <= 0 || nal->size_bits <= 0) {
if (ret < 0) {
av_log(logctx, AV_LOG_ERROR, "Invalid NAL unit %d, skipping.\n",
nal->type);


Loading…
Cancel
Save