/* end of sub2video hack */
-void term_exit(void)
+static void term_exit_sigsafe(void)
{
- av_log(NULL, AV_LOG_QUIET, "%s", "");
#if HAVE_TERMIOS_H
if(restore_tty)
tcsetattr (0, TCSANOW, &oldtty);
#endif
}
+void term_exit(void)
+{
+ av_log(NULL, AV_LOG_QUIET, "%s", "");
+ term_exit_sigsafe();
+}
+
static volatile int received_sigterm = 0;
static volatile int received_nb_signals = 0;
static int main_return_code = 0;
{
received_sigterm = sig;
received_nb_signals++;
- term_exit();
+ term_exit_sigsafe();
if(received_nb_signals > 3)
- exit_program(123);
+ exit(123);
}
void term_init(void)
vid = 1;
}
/* compute min output value */
- if ((is_last_report || !ost->finished) && ost->st->pts.val != AV_NOPTS_VALUE)
+ if (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));
}