diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-04 06:55:46 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-08-08 11:29:33 +0200 |
commit | e35b8b848c2a23212b09ff54846cf62acd78ca66 (patch) | |
tree | c8279215a1c5608613da4f85b0e8eedeba810e6c /libavcodec/cbs.c | |
parent | 33f33beeadcc4f120a7908c9f68c150058e6fccb (diff) |
avcodec/cbs: Remove redundant assignment
The code just creates new references without allocating
new buffers for the subobjects; therefore the actual data pointer
stays valid and need not be updated.
Also remove an assert that ensured that the calculation
for updating the pointer makes sense.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/cbs.c')
-rw-r--r-- | libavcodec/cbs.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/libavcodec/cbs.c b/libavcodec/cbs.c index f715e463a1..43329a14a4 100644 --- a/libavcodec/cbs.c +++ b/libavcodec/cbs.c @@ -955,17 +955,11 @@ static int cbs_clone_internal_refs_unit_content(AVBufferRef **clone_ref, goto fail; } - // src_ptr is required to point somewhere inside src_buf. If it - // doesn't, there is a bug somewhere. - av_assert0(*src_ptr >= (*src_buf)->data && - *src_ptr < (*src_buf)->data + (*src_buf)->size); - *copy_buf = av_buffer_ref(*src_buf); if (!*copy_buf) { err = AVERROR(ENOMEM); goto fail; } - *copy_ptr = (*copy_buf)->data + (*src_ptr - (*src_buf)->data); } *clone_ref = av_buffer_create(copy, desc->content_size, |