Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-08-20 23:06:39 +0400
committerNicolas George <nicolas.george@normalesup.org>2012-08-28 20:48:32 +0400
commit18217bb0f5fb4ad9d93ea02edab078111cd83910 (patch)
tree5503823eaba75168f5a3b28c73a39a7f01424e05 /ffmpeg.c
parent1ea77a52c0b98d633e450ce0a48b7b7e7c0b06a8 (diff)
ffmpeg: report max time of unfinished streams in stats.
Eliminating finished streams avoids the progress stopping with the first stream. Using the max instead of the min avoids the progress stopping with gaps in sparse streams (subtitles). Negligible change for normal circumstances.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 0125398227..58308c9c31 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1059,7 +1059,7 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
AVCodecContext *enc;
int frame_number, vid, i;
double bitrate;
- int64_t pts = INT64_MAX;
+ int64_t pts = INT64_MIN;
static int64_t last_time = -1;
static int qp_histogram[52];
int hours, mins, secs, us;
@@ -1154,8 +1154,9 @@ static void print_report(int is_last_report, int64_t timer_start, int64_t cur_ti
vid = 1;
}
/* compute min output value */
- pts = FFMIN(pts, av_rescale_q(ost->st->pts.val,
- ost->st->time_base, AV_TIME_BASE_Q));
+ if (!ost->finished && ost->st->pts.val != AV_NOPTS_VALUE)
+ pts = FFMAX(pts, av_rescale_q(ost->st->pts.val,
+ ost->st->time_base, AV_TIME_BASE_Q));
}
secs = pts / AV_TIME_BASE;