Commit 2e96f527 authored by Mark Thompson's avatar Mark Thompson Committed by Jorge Ramirez-Ortiz

v4l2_m2m: Fix integer overflow in timestamp handling

parent 388a0f78
......@@ -69,7 +69,8 @@ static inline uint64_t v4l2_get_pts(V4L2Buffer *avbuf)
int64_t v4l2_pts;
/* 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);
}
......
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