Commit 137c0fca authored by James Almer's avatar James Almer

avcodec/cbs_h265: fix storage type for time_offset_value in Time Code SEI

The spec defines it as an array of signed values, inferred to 0 when not
present.
Reviewed-by: 's avatarMark Thompson <sw@jkqxz.net>
Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 9bf520d0
...@@ -659,7 +659,7 @@ typedef struct H265RawSEITimeCode { ...@@ -659,7 +659,7 @@ typedef struct H265RawSEITimeCode {
uint8_t minutes_flag[3]; uint8_t minutes_flag[3];
uint8_t hours_flag[3]; uint8_t hours_flag[3];
uint8_t time_offset_length[3]; uint8_t time_offset_length[3];
uint32_t time_offset_value[3]; int32_t time_offset_value[3];
} H265RawSEITimeCode; } H265RawSEITimeCode;
typedef struct H265RawSEIMasteringDisplayColourVolume { typedef struct H265RawSEIMasteringDisplayColourVolume {
......
...@@ -1986,8 +1986,11 @@ static int FUNC(sei_time_code)(CodedBitstreamContext *ctx, RWContext *rw, ...@@ -1986,8 +1986,11 @@ static int FUNC(sei_time_code)(CodedBitstreamContext *ctx, RWContext *rw,
us(5, time_offset_length[i], 0, 31, 1, i); us(5, time_offset_length[i], 0, 31, 1, i);
if (current->time_offset_length[i] > 0) if (current->time_offset_length[i] > 0)
us(current->time_offset_length[i], time_offset_value[i], is(current->time_offset_length[i], time_offset_value[i],
0, MAX_UINT_BITS(current->time_offset_length[i]), 1, i); MIN_INT_BITS(current->time_offset_length[i]),
MAX_INT_BITS(current->time_offset_length[i]), 1, i);
else
infer(time_offset_value[i], 0);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment