summaryrefslogtreecommitdiff
path: root/libavcodec/hevc_sei.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-12-06 12:30:14 -0300
committerJames Almer <jamrial@gmail.com>2020-12-07 14:22:52 -0300
commit1aa72fe79454c8f0a9adcd9ac7e6fbd20bbfe1a4 (patch)
treebcd899a7457055f2a4d4c323af3d0ee2b85e81e7 /libavcodec/hevc_sei.c
parentb9f7c9b2723f44aa7850c24f9dcbb6a4e3ac555f (diff)
avcodec/dynamic_hdr10_plus: don't take a GetBitContext as input argument
Create a local one instead from a byte buffer input argument. This prevents skipping bytes that may belong to another SEI message. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevc_sei.c')
-rw-r--r--libavcodec/hevc_sei.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/hevc_sei.c b/libavcodec/hevc_sei.c
index 159ef5830a..3b0fa43439 100644
--- a/libavcodec/hevc_sei.c
+++ b/libavcodec/hevc_sei.c
@@ -216,7 +216,8 @@ static int decode_registered_user_data_dynamic_hdr_plus(HEVCSEIDynamicHDRPlus *s
if (!metadata)
return AVERROR(ENOMEM);
- err = ff_parse_itu_t_t35_to_dynamic_hdr10_plus(gb, metadata);
+ err = ff_parse_itu_t_t35_to_dynamic_hdr10_plus(metadata,
+ gb->buffer + get_bits_count(gb) / 8, size);
if (err < 0) {
av_free(metadata);
return err;
@@ -229,6 +230,8 @@ static int decode_registered_user_data_dynamic_hdr_plus(HEVCSEIDynamicHDRPlus *s
return AVERROR(ENOMEM);
}
+ skip_bits_long(gb, size * 8);
+
return 0;
}