mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-15 13:21:09 +08:00
fftools/ffmpeg: add a helper function to access output file size
Stop accessing muxer internals from outside of ffmpeg_mux.
This commit is contained in:
@@ -1516,8 +1516,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
|
||||
{
|
||||
AVBPrint buf, buf_script;
|
||||
OutputStream *ost;
|
||||
AVFormatContext *oc;
|
||||
int64_t total_size;
|
||||
int64_t total_size = of_filesize(output_files[0]);
|
||||
AVCodecContext *enc;
|
||||
int vid, i;
|
||||
double bitrate;
|
||||
@@ -1546,13 +1545,6 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
|
||||
|
||||
t = (cur_time-timer_start) / 1000000.0;
|
||||
|
||||
|
||||
oc = output_files[0]->ctx;
|
||||
|
||||
total_size = avio_size(oc->pb);
|
||||
if (total_size <= 0) // FIXME improve avio_size() so it works with non seekable output too
|
||||
total_size = avio_tell(oc->pb);
|
||||
|
||||
vid = 0;
|
||||
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
||||
av_bprint_init(&buf_script, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
||||
|
Reference in New Issue
Block a user