From patchwork Tue May 14 11:04:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 13106 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 2BDE0449569 for ; Tue, 14 May 2019 14:11:14 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 070D668070A; Tue, 14 May 2019 14:11:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe05-2.mx.upcmail.net (vie01a-dmta-pe05-2.mx.upcmail.net [84.116.36.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1ABDB6802BD for ; Tue, 14 May 2019 14:11:08 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe05.mx.upcmail.net with esmtp (Exim 4.91) (envelope-from ) id 1hQVKt-0002Qm-Ct for ffmpeg-devel@ffmpeg.org; Tue, 14 May 2019 13:11:07 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id QVGwhr08w5D5NQVH4hglNG; Tue, 14 May 2019 13:07:21 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.41.20 X-CNFS-Analysis: v=2.3 cv=bu8y+3Si c=1 sm=1 tr=0 a=I1eytVlZLDX1BM2VTtTtSw==:117 a=I1eytVlZLDX1BM2VTtTtSw==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=z_tRDEHsRfBGVxqhAbIA:9 a=6Tl1ED5Nsx2CP3wj:21 a=CjXjgdh4AM3ZKT_s:21 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 14 May 2019 13:04:51 +0200 Message-Id: <20190514110452.31941-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfGhM0NbhnvzE38Bp2NaOMjY3aJKNkrcdqZi5QSI/8jbEe+qJJsu+r6NslYeRfoSPD4GciDpgB5uncfFh2Dkae0rJ4P2OBLPL6CDmhLYYoWem1+/5npfK daoRk87KnfLeFLFMZLXesj4hgTH4v7wigdnyDmOh41iGIfcU1DyZ4IfD Subject: [FFmpeg-devel] [PATCH 1/2] avformat/dashenc: use 64bit for handling the return of avio_tell() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The return code is 64bit, so this is more correct, especially in case it actually would be a file of such large size Signed-off-by: Michael Niedermayer --- libavformat/dashenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c index b88d4b3496..94b198ceb8 100644 --- a/libavformat/dashenc.c +++ b/libavformat/dashenc.c @@ -1611,11 +1611,11 @@ static int dash_flush(AVFormatContext *s, int final, int stream) for (i = 0; i < s->nb_streams; i++) { OutputStream *os = &c->streams[i]; if (os->ctx && os->ctx_inited) { - int file_size = avio_tell(os->ctx->pb); + int64_t file_size = avio_tell(os->ctx->pb); av_write_trailer(os->ctx); if (c->global_sidx) { int j, start_index, start_number; - int sidx_size = avio_tell(os->ctx->pb) - file_size; + int64_t sidx_size = avio_tell(os->ctx->pb) - file_size; get_start_index_number(os, c, &start_index, &start_number); if (start_index >= os->nb_segments || os->segment_type != SEGMENT_TYPE_MP4)