diff mbox series

[FFmpeg-devel,09/28] ffmpeg: fix the type of limit_filesize

Message ID 20220111095830.31542-9-anton@khirnov.net
State New
Headers show
Series [FFmpeg-devel,01/28] ffmpeg: pass the muxer context explicitly to some functions | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Anton Khirnov Jan. 11, 2022, 9:58 a.m. UTC
The option is parsed as INT64 (signed). It is also compared to the
output of avio_tell(), which is also int64_t.
---
 fftools/ffmpeg.h     | 4 ++--
 fftools/ffmpeg_opt.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index dfcaa875d9..80b90e372d 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -145,7 +145,7 @@  typedef struct OptionsContext {
 
     int64_t recording_time;
     int64_t stop_time;
-    uint64_t limit_filesize;
+    int64_t limit_filesize;
     float mux_preload;
     float mux_max_delay;
     int shortest;
@@ -586,7 +586,7 @@  typedef struct OutputFile {
     int ost_index;       /* index of the first stream in output_streams */
     int64_t recording_time;  ///< desired length of the resulting file in microseconds == AV_TIME_BASE units
     int64_t start_time;      ///< start time in microseconds == AV_TIME_BASE units
-    uint64_t limit_filesize; /* filesize limit expressed in bytes */
+    int64_t limit_filesize; /* filesize limit expressed in bytes */
 
     int shortest;
 } OutputFile;
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 2ed09d4a7a..4d2b80683e 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -220,7 +220,7 @@  static void init_options(OptionsContext *o)
     o->start_time     = AV_NOPTS_VALUE;
     o->start_time_eof = AV_NOPTS_VALUE;
     o->recording_time = INT64_MAX;
-    o->limit_filesize = UINT64_MAX;
+    o->limit_filesize = INT64_MAX;
     o->chapters_input_file = INT_MAX;
     o->accurate_seek  = 1;
     o->thread_queue_size = -1;