diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-07-08 01:14:01 +0200 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2019-07-08 22:59:41 +0100 |
commit | 730e5be3aa1118a63132122dd06aa4f3311af07d (patch) | |
tree | 21fee671a0a2538df4ecba1bbf2e48b5c036b23b /libavcodec/cbs_h2645.c | |
parent | 70a4f46e48da8bc8a547e490f67dde5165227dd8 (diff) | |
download | ffmpeg-730e5be3aa1118a63132122dd06aa4f3311af07d.tar.gz |
cbs: ff_cbs_delete_unit: Replace return value with assert
ff_cbs_delete_unit never fails if the index of the unit to delete is
valid, as it is with all current callers of the function. So just assert
in ff_cbs_delete_unit that the index is valid and change the return
value to void in order to remove the callers' checks for whether
ff_cbs_delete_unit failed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/cbs_h2645.c')
-rw-r--r-- | libavcodec/cbs_h2645.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 0456937710..484b145852 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -1664,7 +1664,7 @@ int ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx, } av_assert0(i < au->nb_units && "NAL unit not in access unit."); - return ff_cbs_delete_unit(ctx, au, i); + ff_cbs_delete_unit(ctx, au, i); } else { cbs_h264_free_sei_payload(&sei->payload[position]); @@ -1672,7 +1672,7 @@ int ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx, memmove(sei->payload + position, sei->payload + position + 1, (sei->payload_count - position) * sizeof(*sei->payload)); - - return 0; } + + return 0; } |