mirror of https://git.ffmpeg.org/ffmpeg.git
avconv: Do not pass NULL to avio_tell
The null demuxer does not have a backing AVIOContext.
This commit is contained in:
parent
f8f7ad758d
commit
44129e3804
5
avconv.c
5
avconv.c
|
@ -909,7 +909,7 @@ static void print_report(int is_last_report, int64_t timer_start)
|
|||
char buf[1024];
|
||||
OutputStream *ost;
|
||||
AVFormatContext *oc;
|
||||
int64_t total_size;
|
||||
int64_t total_size = 0;
|
||||
AVCodecContext *enc;
|
||||
int frame_number, vid, i;
|
||||
double bitrate, ti1, pts;
|
||||
|
@ -934,7 +934,7 @@ static void print_report(int is_last_report, int64_t timer_start)
|
|||
|
||||
|
||||
oc = output_files[0]->ctx;
|
||||
|
||||
if (oc->pb) {
|
||||
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);
|
||||
|
@ -945,6 +945,7 @@ static void print_report(int is_last_report, int64_t timer_start)
|
|||
"avio_tell() failed: %s\n", errbuf);
|
||||
total_size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
buf[0] = '\0';
|
||||
ti1 = 1e10;
|
||||
|
|
Loading…
Reference in New Issue