mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
v4l2_m2m: Fix integer overflow in timestamp handling
This commit is contained in:
parent
388a0f7869
commit
2e96f52780
@ -69,7 +69,8 @@ static inline uint64_t v4l2_get_pts(V4L2Buffer *avbuf)
|
|||||||
int64_t v4l2_pts;
|
int64_t v4l2_pts;
|
||||||
|
|
||||||
/* convert pts back to encoder timebase */
|
/* convert pts back to encoder timebase */
|
||||||
v4l2_pts = avbuf->buf.timestamp.tv_sec * USEC_PER_SEC + avbuf->buf.timestamp.tv_usec;
|
v4l2_pts = (int64_t)avbuf->buf.timestamp.tv_sec * USEC_PER_SEC +
|
||||||
|
avbuf->buf.timestamp.tv_usec;
|
||||||
|
|
||||||
return av_rescale_q(v4l2_pts, v4l2_timebase, s->avctx->time_base);
|
return av_rescale_q(v4l2_pts, v4l2_timebase, s->avctx->time_base);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user