Commit 53ddd43f authored by Anton Khirnov's avatar Anton Khirnov

avconv: use only meaningful timestamps in start time check.

parent b98c8f4f
...@@ -1560,7 +1560,7 @@ static int poll_filters(void) ...@@ -1560,7 +1560,7 @@ static int poll_filters(void)
break; break;
avfilter_copy_buf_props(filtered_frame, picref); avfilter_copy_buf_props(filtered_frame, picref);
if (picref->pts != AV_NOPTS_VALUE) if (picref->pts != AV_NOPTS_VALUE) {
filtered_frame->pts = av_rescale_q(picref->pts, filtered_frame->pts = av_rescale_q(picref->pts,
ost->filter->filter->inputs[0]->time_base, ost->filter->filter->inputs[0]->time_base,
ost->st->codec->time_base) - ost->st->codec->time_base) -
...@@ -1568,9 +1568,10 @@ static int poll_filters(void) ...@@ -1568,9 +1568,10 @@ static int poll_filters(void)
AV_TIME_BASE_Q, AV_TIME_BASE_Q,
ost->st->codec->time_base); ost->st->codec->time_base);
if (of->start_time && filtered_frame->pts < 0) { if (of->start_time && filtered_frame->pts < 0) {
avfilter_unref_buffer(picref); avfilter_unref_buffer(picref);
continue; continue;
}
} }
switch (ost->filter->filter->inputs[0]->type) { switch (ost->filter->filter->inputs[0]->type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment