diff options
author | Mark Thompson <sw@jkqxz.net> | 2023-01-24 22:46:23 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2023-05-17 19:38:45 +0000 |
commit | 84505310594e61a9eba3a4abbfc00b882db33a08 (patch) | |
tree | 79d45960082e2c50fc6e4fba5238cc2f33915628 /libavcodec | |
parent | 9c830f4f6560227a81df7b96cad8648a1dc66f62 (diff) | |
download | ffmpeg-84505310594e61a9eba3a4abbfc00b882db33a08.tar.gz |
av1_parse: Don't reject zero-size padding OBUs
Padding OBUs are not required to be nonempty.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/av1_parse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/av1_parse.c b/libavcodec/av1_parse.c index 948e8eb62a..061636815f 100644 --- a/libavcodec/av1_parse.c +++ b/libavcodec/av1_parse.c @@ -88,7 +88,9 @@ int ff_av1_packet_split(AV1Packet *pkt, const uint8_t *buf, int length, void *lo obu->size_bits = get_obu_bit_length(obu->data, obu->size, obu->type); - if (obu->size_bits < 0 || (!obu->size_bits && obu->type != AV1_OBU_TEMPORAL_DELIMITER)) { + if (obu->size_bits < 0 || + (obu->size_bits == 0 && (obu->type != AV1_OBU_TEMPORAL_DELIMITER && + obu->type != AV1_OBU_PADDING))) { av_log(logctx, AV_LOG_ERROR, "Invalid OBU of type %d, skipping.\n", obu->type); continue; } |