diff options
author | Alex Converse <alex.converse@gmail.com> | 2011-08-30 04:45:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-30 17:57:59 +0200 |
commit | dadbebbbbca0b0dc42c437b2d425277d2bdd896f (patch) | |
tree | e9e17e9aae4821e8765453f0958797ebd7e7f6db /ffmpeg.c | |
parent | 7357f6e6787958a2b827c397ae46af12e55a2a55 (diff) | |
download | ffmpeg-dadbebbbbca0b0dc42c437b2d425277d2bdd896f.tar.gz |
ffmpeg: Don't unnecessarily convert ipts to a double.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -2309,11 +2309,11 @@ 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; /* if 'q' pressed, exits */ if (!using_stdin) { @@ -2393,14 +2393,15 @@ static int transcode(AVFormatContext **output_files, 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; |