summaryrefslogtreecommitdiff
path: root/libavcodec/cbs_h2645.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-07-08 01:14:02 +0200
committerMark Thompson <sw@jkqxz.net>2019-07-08 22:59:41 +0100
commitd9418aba66e7f9d32c11d0ee1b8cddaf1e68e1b6 (patch)
tree2b9b7eeeec1ccfc05c86ff5c91fc1aacb12f1f5b /libavcodec/cbs_h2645.c
parent730e5be3aa1118a63132122dd06aa4f3311af07d (diff)
cbs_h264, h264_metadata: Deleting SEI messages never fails
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.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/cbs_h2645.c')
-rw-r--r--libavcodec/cbs_h2645.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 484b145852..b286269913 100644
--- a/libavcodec/cbs_h2645.c
+++ b/libavcodec/cbs_h2645.c
@@ -1644,10 +1644,10 @@ int ff_cbs_h264_add_sei_message(CodedBitstreamContext *ctx,
return 0;
}
-int ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx,
- CodedBitstreamFragment *au,
- CodedBitstreamUnit *nal,
- int position)
+void ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx,
+ CodedBitstreamFragment *au,
+ CodedBitstreamUnit *nal,
+ int position)
{
H264RawSEI *sei = nal->content;
@@ -1662,7 +1662,6 @@ int ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx,
if (&au->units[i] == nal)
break;
}
- av_assert0(i < au->nb_units && "NAL unit not in access unit.");
ff_cbs_delete_unit(ctx, au, i);
} else {
@@ -1673,6 +1672,4 @@ int ff_cbs_h264_delete_sei_message(CodedBitstreamContext *ctx,
sei->payload + position + 1,
(sei->payload_count - position) * sizeof(*sei->payload));
}
-
- return 0;
}