Browse Source

ffmpeg: do not use a negative total_size (AVERROR) in bitrate estimation.

tags/n0.9
Clément Bœsch Clément Bœsch 14 years ago
parent
commit
b6ffe441cd
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      ffmpeg.c

+ 4
- 1
ffmpeg.c View File

@@ -1434,8 +1434,11 @@ static void print_report(OutputFile *output_files,
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
if (total_size < 0) { // FIXME improve avio_size() so it works with non seekable output too
total_size= avio_tell(oc->pb);
if (total_size < 0)
total_size = 0;
}

buf[0] = '\0';
vid = 0;


Loading…
Cancel
Save