[FFmpeg-devel] [PATCH 3/7] avcodec/cbs_h2645: Remove redundant assert

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Tue Dec 10 00:26:00 EET 2019


cbs_h2645_assemble_fragment() asserted that every unit of the fragment
that should be written contain data; yet this is also asserted
generically in ff_cbs_write_fragment_data(). So drop the redundant
assert.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavcodec/cbs_h2645.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 4b17780836..7c92ae4871 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -1387,11 +1387,6 @@ static int cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx,
     size_t max_size, dp, sp;
     int err, i, zero_run;
 
-    for (i = 0; i < frag->nb_units; i++) {
-        // Data should already all have been written when we get here.
-        av_assert0(frag->units[i].data);
-    }
-
     // Content with worst-case emulation prevention.
     max_size = frag->data_size + frag->data_size / 2;
     if (frag->nb_units > (int)(INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE
-- 
2.20.1



More information about the ffmpeg-devel mailing list