mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
ffmpeg: Don't unnecessarily convert ipts to a double.
This commit is contained in:
parent
7357f6e678
commit
dadbebbbbc
9
ffmpeg.c
9
ffmpeg.c
@ -2309,11 +2309,11 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
for(; received_sigterm == 0;) {
|
for(; received_sigterm == 0;) {
|
||||||
int file_index, ist_index;
|
int file_index, ist_index;
|
||||||
AVPacket pkt;
|
AVPacket pkt;
|
||||||
double ipts_min;
|
int64_t ipts_min;
|
||||||
double opts_min;
|
double opts_min;
|
||||||
|
|
||||||
redo:
|
redo:
|
||||||
ipts_min= 1e100;
|
ipts_min= INT64_MAX;
|
||||||
opts_min= 1e100;
|
opts_min= 1e100;
|
||||||
/* if 'q' pressed, exits */
|
/* if 'q' pressed, exits */
|
||||||
if (!using_stdin) {
|
if (!using_stdin) {
|
||||||
@ -2393,14 +2393,15 @@ static int transcode(AVFormatContext **output_files,
|
|||||||
smallest output pts */
|
smallest output pts */
|
||||||
file_index = -1;
|
file_index = -1;
|
||||||
for(i=0;i<nb_ostreams;i++) {
|
for(i=0;i<nb_ostreams;i++) {
|
||||||
double ipts, opts;
|
int64_t ipts;
|
||||||
|
double opts;
|
||||||
ost = ost_table[i];
|
ost = ost_table[i];
|
||||||
os = output_files[ost->file_index];
|
os = output_files[ost->file_index];
|
||||||
ist = &input_streams[ost->source_index];
|
ist = &input_streams[ost->source_index];
|
||||||
if(ist->is_past_recording_time || no_packet[ist->file_index])
|
if(ist->is_past_recording_time || no_packet[ist->file_index])
|
||||||
continue;
|
continue;
|
||||||
opts = ost->st->pts.val * av_q2d(ost->st->time_base);
|
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 (!input_files[ist->file_index].eof_reached){
|
||||||
if(ipts < ipts_min) {
|
if(ipts < ipts_min) {
|
||||||
ipts_min = ipts;
|
ipts_min = ipts;
|
||||||
|
Loading…
Reference in New Issue
Block a user