Pass the input through in that case. Fixes a regression since a696b28886. Signed-off-by: James Almer <jamr...@gmail.com> --- libavformat/hevc.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/libavformat/hevc.c b/libavformat/hevc.c index e1f31ee1bb..8a3b8741bf 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -1212,6 +1212,14 @@ static int write_configuration_record(AVIOContext *pb, const uint8_t *data, flags |= FLAG_IS_NALFF; num_arrays = get_bits(&gbc, 8); + + /* If there are no arrays, there's nothing to parse. + * Just copy the record. */ + if (!num_arrays) { + avio_write(pb, data, size); + return 0; + } + for (int i = 0; i < num_arrays; i++) { int type, num_nalus; -- 2.47.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".