aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-11 14:12:08 +0100
committerAnton Khirnov <anton@khirnov.net>2022-07-23 11:53:19 +0200
commitd8e944c2385fab726beb48011ebe1e48b84fe96c (patch)
treefc097801baa1b2b6eb2c877f3d98b58a818ed053 /fftools/ffmpeg.h
parent81af4dec27b6e0db7b7ed80bf96aaaccbf702954 (diff)
downloadffmpeg-d8e944c2385fab726beb48011ebe1e48b84fe96c.tar.gz
fftools/ffmpeg: refactor limiting output file size with -fs
Move the file size checking code to ffmpeg_mux. Use the recently introduced of_filesize(), making this code consistent with the size shown by print_report().
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index 7721f959c1..7ab7aa94bf 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -596,7 +596,6 @@ 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
- int64_t limit_filesize; /* filesize limit expressed in bytes */
int shortest;
} OutputFile;
@@ -697,7 +696,7 @@ int hw_device_setup_for_filter(FilterGraph *fg);
int hwaccel_decode_init(AVCodecContext *avctx);
-int of_muxer_init(OutputFile *of);
+int of_muxer_init(OutputFile *of, int64_t limit_filesize);
/* open the muxer when all the streams are initialized */
int of_check_init(OutputFile *of);
int of_write_trailer(OutputFile *of);
@@ -705,6 +704,7 @@ void of_close(OutputFile **pof);
void of_write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost,
int unqueue);
+int of_finished(OutputFile *of);
int64_t of_filesize(OutputFile *of);
#endif /* FFTOOLS_FFMPEG_H */