On 08/07/2019 00:14, Andreas Rheinhardt wrote: > 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.rheinha...@gmail.com> > --- > libavcodec/av1_metadata_bsf.c | 9 ++------- > libavcodec/cbs.c | 12 +++++------- > libavcodec/cbs.h | 8 +++++--- > libavcodec/cbs_h2645.c | 6 +++--- > libavcodec/h264_metadata_bsf.c | 8 +------- > libavcodec/h264_redundant_pps_bsf.c | 4 +--- > 6 files changed, 17 insertions(+), 30 deletions(-) > On 08/07/2019 00:14, Andreas Rheinhardt wrote: > Given the recent changes to ff_cbs_delete_unit, it is no longer sensible > to use a return value for ff_cbs_h264_delete_sei_message; instead, use > asserts to ensure that the required conditions are met and remove the > callers' checks for the return value. Also, document said conditions. > > An assert that is essentially equivalent to the one used in > ff_cbs_delete_unit has been removed, too. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> > --- > libavcodec/cbs_h264.h | 11 +++++++---- > libavcodec/cbs_h2645.c | 11 ++++------- > libavcodec/h264_metadata_bsf.c | 21 +++++---------------- > 3 files changed, 16 insertions(+), 27 deletions(-)
LGTM; both applied. Thanks, - Mark _______________________________________________ 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".