aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-08-16 14:41:16 -0700
committerAlex Converse <alex.converse@gmail.com>2011-08-17 10:05:57 -0700
commit9be3c1245f6a4331baf1beb28d368cbdaa1b47f5 (patch)
treec1e8eb4e132c6a8ac2fe31af491182539b290869 /avconv.c
parentf056fc2c6ce73267c7fcb15f1aad2c2109813fee (diff)
downloadffmpeg-9be3c1245f6a4331baf1beb28d368cbdaa1b47f5.tar.gz
avconv: Don't unnecessarily convert ipts to a double.
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/avconv.c b/avconv.c
index 66772aab9c..50fa1a70db 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2213,25 +2213,26 @@ static int transcode(AVFormatContext **output_files,
for(; received_sigterm == 0;) {
int file_index, ist_index;
AVPacket pkt;
- double ipts_min;
+ int64_t ipts_min;
double opts_min;
redo:
- ipts_min= 1e100;
+ ipts_min = INT64_MAX;
opts_min= 1e100;
/* select the stream that we must read now by looking at the
smallest output pts */
file_index = -1;
for(i=0;i<nb_ostreams;i++) {
- double ipts, opts;
+ int64_t ipts;
+ double opts;
ost = ost_table[i];
os = output_files[ost->file_index];
ist = &input_streams[ost->source_index];
if(ist->is_past_recording_time || no_packet[ist->file_index])
continue;
opts = ost->st->pts.val * av_q2d(ost->st->time_base);
- ipts = (double)ist->pts;
+ ipts = ist->pts;
if (!input_files[ist->file_index].eof_reached){
if(ipts < ipts_min) {
ipts_min = ipts;