]> git.sesse.net Git - ffmpeg/commitdiff
avformat/dashenc: use 64bit for handling the return of avio_tell()
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 14 May 2019 11:04:51 +0000 (13:04 +0200)
committerKarthick J <kjeyapal@akamai.com>
Fri, 17 May 2019 04:02:21 +0000 (09:32 +0530)
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 <michael@niedermayer.cc>
libavformat/dashenc.c

index b88d4b349604c629f28aa1e0bfac086c6b0a70e5..94b198ceb8d01e1f12c522e16ee6069f7868b8ee 100644 (file)
@@ -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)