avcodec/cbs_h264: fix storage type for time_offset in Pic Timing SEI
The spec defines it as a signed value. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -253,7 +253,7 @@ typedef struct H264RawSEIPicTimestamp {
|
|||||||
uint8_t minutes_value;
|
uint8_t minutes_value;
|
||||||
uint8_t hours_flag;
|
uint8_t hours_flag;
|
||||||
uint8_t hours_value;
|
uint8_t hours_value;
|
||||||
uint32_t time_offset;
|
int32_t time_offset;
|
||||||
} H264RawSEIPicTimestamp;
|
} H264RawSEIPicTimestamp;
|
||||||
|
|
||||||
typedef struct H264RawSEIPicTiming {
|
typedef struct H264RawSEIPicTiming {
|
||||||
|
@@ -592,8 +592,9 @@ static int FUNC(sei_pic_timestamp)(CodedBitstreamContext *ctx, RWContext *rw,
|
|||||||
time_offset_length = 24;
|
time_offset_length = 24;
|
||||||
|
|
||||||
if (time_offset_length > 0)
|
if (time_offset_length > 0)
|
||||||
u(time_offset_length, time_offset,
|
i(time_offset_length, time_offset,
|
||||||
0, MAX_UINT_BITS(time_offset_length));
|
MIN_INT_BITS(time_offset_length),
|
||||||
|
MAX_INT_BITS(time_offset_length));
|
||||||
else
|
else
|
||||||
infer(time_offset, 0);
|
infer(time_offset, 0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user