diff --git a/decoder_plugins/ffmpeg/ffmpeg.c b/decoder_plugins/ffmpeg/ffmpeg.c index 22a51bed..c043b5ad 100644 --- a/decoder_plugins/ffmpeg/ffmpeg.c +++ b/decoder_plugins/ffmpeg/ffmpeg.c @@ -1190,7 +1190,7 @@ static bool seek_in_stream (struct ffmpeg_data *data, int sec) data->stream->time_base.num); if (data->stream->start_time != (int64_t)AV_NOPTS_VALUE) { - if (seek_ts > INT64_MAX - data->stream->start_time) { + if (seek_ts > INT64_MAX - MAX(0, data->stream->start_time)) { logit ("Seek value too large"); return false; } diff --git a/interface_elements.c b/interface_elements.c index 006b3352..8b647378 100644 --- a/interface_elements.c +++ b/interface_elements.c @@ -3896,6 +3896,10 @@ void iface_get_key (struct iface_key *k) if (ch == (wint_t)ERR) interface_fatal ("wgetch() failed!"); + /* Handle keypad ENTER as newline. */ + if (ch == KEY_ENTER) + ch = '\n'; + if (ch < 32 && ch != '\n' && ch != '\t' && ch != KEY_ESCAPE) { /* Unprintable, generally control sequences */ k->type = IFACE_KEY_FUNCTION; @@ -4132,10 +4136,10 @@ void iface_error (const char *msg) /* Handle screen resizing. */ void iface_resize () { - check_term_size (&main_win, &info_win); - validate_layouts (); endwin (); refresh (); + check_term_size (&main_win, &info_win); + validate_layouts (); main_win_resize (&main_win); info_win_resize (&info_win); iface_refresh_screen (); diff --git a/mocp.1 b/mocp.1 index 165225a3..ef8746f4 100644 --- a/mocp.1 +++ b/mocp.1 @@ -417,7 +417,7 @@ before they are processed. .B MOCP_POPTRC A colon-separated list of POPT configuration files which will be loaded in sequence by MOC during initialisation. If the variable is unset then the - default POPT configuration file will be used. If the variable is set but +default POPT configuration file will be used. If the variable is set but empty then no POPT configuration file will be loaded. If the variable is set then those files which exist will be loaded and those which don't will be skipped.