From 63e7d763eb215bcc4a8f0161f8c7cad96df77ca0 Mon Sep 17 00:00:00 2001 From: abaxxx Date: Mon, 7 Mar 2016 19:39:57 +0530 Subject: [PATCH] Update FFmpegWrapper.c The line in 411 can cause errors for large values of numbers when tried to type cast to int. So using a 64- int fixes the issue. --- FFmpegWrapper/jni/FFmpegWrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FFmpegWrapper/jni/FFmpegWrapper.c b/FFmpegWrapper/jni/FFmpegWrapper.c index e77cb92..bfb5619 100644 --- a/FFmpegWrapper/jni/FFmpegWrapper.c +++ b/FFmpegWrapper/jni/FFmpegWrapper.c @@ -408,7 +408,7 @@ void Java_net_openwatch_ffmpegwrapper_FFmpegWrapper_writeAVPacketFromEncodedData packet->size = (int) jSize; packet->data = data; - packet->pts = (int) jPts; + packet->pts = (int64_) jPts; packet->pts = av_rescale_q(packet->pts, *videoSourceTimeBase, (outputFormatContext->streams[packet->stream_index]->time_base)); @@ -435,4 +435,4 @@ void Java_net_openwatch_ffmpegwrapper_FFmpegWrapper_finalizeAVFormatContext(JNIE if(writeTrailerResult < 0){ LOGE("av_write_trailer error: %d", writeTrailerResult); } -} \ No newline at end of file +}