You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-11 14:30:22 +02:00
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().
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user