summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mplayer.c b/mplayer.c
index 38aeaebbe6..7006614df1 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -23,6 +23,7 @@
#include <assert.h>
#include <libavutil/intreadwrite.h>
+#include <libavutil/attributes.h>
#include "config.h"
#include "talloc.h"
@@ -575,7 +576,8 @@ void uninit_player(struct MPContext *mpctx, unsigned int mask)
}
}
-static void exit_player(struct MPContext *mpctx, enum exit_reason how, int rc)
+static av_noreturn void exit_player(struct MPContext *mpctx,
+ enum exit_reason how, int rc)
{
uninit_player(mpctx, INITIALIZED_ALL);
@@ -1479,8 +1481,11 @@ static void update_osd_msg(struct MPContext *mpctx)
if (strcmp(mpctx->terminal_osd_text, msg->msg)) {
talloc_free(mpctx->terminal_osd_text);
mpctx->terminal_osd_text = talloc_strdup(mpctx, msg->msg);
+ // Multi-line message => clear what will be the second line
+ write_status_line(mpctx, "");
mp_msg(MSGT_CPLAYER, MSGL_STATUS, "%s%s\n", opts->term_osd_esc,
mpctx->terminal_osd_text);
+ print_status(mpctx, MP_NOPTS_VALUE, false);
}
}
return;
@@ -2100,7 +2105,6 @@ static int fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
{
struct MPOpts *opts = &mpctx->opts;
struct ao *ao = mpctx->ao;
- unsigned int t;
int playsize;
int playflags = 0;
bool audio_eof = false;
@@ -2118,9 +2122,6 @@ static int fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
else
playsize = ao_get_space(ao);
- // Fill buffer if needed:
- t = GetTimer();
-
// Coming here with hrseek_active still set means audio-only
if (!mpctx->sh_video)
mpctx->syncing_audio = false;
@@ -2148,7 +2149,7 @@ static int fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
else if (mpctx->sh_audio->ds->eof)
audio_eof = true;
}
- t = GetTimer() - t;
+
if (endpts != MP_NOPTS_VALUE && modifiable_audio_format) {
double bytes = (endpts - written_audio_pts(mpctx) + audio_delay)
* ao->bps / opts->playback_speed;