diff options
author | Mark Thompson <sw@jkqxz.net> | 2018-05-07 23:05:52 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2018-05-10 22:05:44 +0100 |
commit | 4c9741a1dddf8fd616da112a915413651d7ddd37 (patch) | |
tree | f3fc01c1bdae76a5bf0a0c45686d023d17d139fd /libavcodec/cbs_h264_syntax_template.c | |
parent | 6dc79637f34f4a5a76f4bf9e66b78a27d156b1df (diff) |
cbs_h264: Fix handling of unknown SEI
The user should only interact directly with the data length, not the
payload size.
Diffstat (limited to 'libavcodec/cbs_h264_syntax_template.c')
-rw-r--r-- | libavcodec/cbs_h264_syntax_template.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/cbs_h264_syntax_template.c b/libavcodec/cbs_h264_syntax_template.c index 3ec4299915..b789207e33 100644 --- a/libavcodec/cbs_h264_syntax_template.c +++ b/libavcodec/cbs_h264_syntax_template.c @@ -761,8 +761,11 @@ static int FUNC(sei_payload)(CodedBitstreamContext *ctx, RWContext *rw, break; default: { - allocate(current->payload.other.data, current->payload_size); - for (i = 0; i < current->payload_size; i++) +#ifdef READ + current->payload.other.data_length = current->payload_size; +#endif + allocate(current->payload.other.data, current->payload.other.data_length); + for (i = 0; i < current->payload.other.data_length; i++) xu(8, payload_byte[i], current->payload.other.data[i], 0, 255, 1, i); } } |