Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
973b555672 | ||
|
|
0a40fb00b4 | ||
|
|
3c8aecb711 | ||
|
|
b3707f4e21 | ||
|
|
af58a8c324 | ||
|
|
3fae6aaae8 | ||
|
|
919540ce8e | ||
|
|
ad9d1a3fb7 | ||
|
|
f16b1cdc17 | ||
|
|
f2e289dc80 | ||
|
|
4a0e50d2a6 | ||
|
|
a6eb0714fa |
No files matched your search
+2
-2
@@ -1137,8 +1137,8 @@ Property list
|
||||
See ``--ass-style-override``.
|
||||
|
||||
``stream-capture`` (RW)
|
||||
A filename, see ``--capture``. Setting this will start capture using the
|
||||
given filename. Setting it to an empty string will stop it.
|
||||
A filename, see ``--stream-capture``. Setting this will start capture using
|
||||
the given filename. Setting it to an empty string will stop it.
|
||||
|
||||
``tv-brightness``, ``tv-contrast``, ``tv-saturation``, ``tv-hue`` (RW)
|
||||
TV stuff.
|
||||
|
||||
@@ -1146,6 +1146,7 @@ Subtitles
|
||||
:yes: Apply all the ``--ass-*`` style override options. Changing the default
|
||||
for any of these options can lead to incorrect subtitle rendering
|
||||
(default).
|
||||
:signfs: like ``yes``, but apply ``--sub-scale`` only to signs
|
||||
:no: Render subtitles as forced by subtitle scripts.
|
||||
:force: Try to force the font style as defined by the ``--sub-text-*``
|
||||
options. Requires a modified libass, can break rendering easily.
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
Release 0.6.2
|
||||
=============
|
||||
|
||||
Changes
|
||||
-------
|
||||
|
||||
- The --ass-style-override option now requires a newer version of libass.
|
||||
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
- Correctly signal EOF when using --frames.
|
||||
- Strictly endorce the limit imposed by --frames (i.e. avoid producing an extra
|
||||
frame at the end).
|
||||
- Fix \x-style escaping when parsing commands.
|
||||
- Correctly handle ^h key on the terminal (this should fix the when inserted
|
||||
fromBackspace key on new versions of xterm).
|
||||
- Don't put the player to sleep after audio reinit.
|
||||
- Properly exit if both audio and video fail to initialize.
|
||||
|
||||
This listing is not complete. There are many more bug fixes and changes. The
|
||||
complete change log can be viewed by running ``git log a6eb071..0a40fb0`` in
|
||||
the git repository.
|
||||
|
||||
Release 0.6.1
|
||||
=============
|
||||
|
||||
|
||||
+1
-1
@@ -171,7 +171,7 @@ static bool mp_parse_escape(void *talloc_ctx, bstr *dst, bstr *code)
|
||||
if (code->start[0] == 'x' && code->len >= 3) {
|
||||
bstr num = bstr_splice(*code, 1, 3);
|
||||
char c = bstrtoll(num, &num, 16);
|
||||
if (!num.len)
|
||||
if (num.len)
|
||||
return false;
|
||||
bstr_xappend(talloc_ctx, dst, (bstr){&c, 1});
|
||||
*code = bstr_cut(*code, 3);
|
||||
|
||||
+1
-1
@@ -1149,7 +1149,7 @@ static const videocodec_info_t vinfo[] = {
|
||||
|
||||
static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track)
|
||||
{
|
||||
unsigned char *extradata;
|
||||
unsigned char *extradata = NULL;
|
||||
unsigned int extradata_size = 0;
|
||||
bool raw = false;
|
||||
struct sh_stream *sh = new_sh_stream(demuxer, STREAM_VIDEO);
|
||||
|
||||
+1
-1
@@ -332,7 +332,7 @@ const m_option_t mp_opts[] = {
|
||||
OPT_CHOICE("ass-shaper", ass_shaper, 0,
|
||||
({"simple", 0}, {"complex", 1})),
|
||||
OPT_CHOICE("ass-style-override", ass_style_override, 0,
|
||||
({"no", 0}, {"yes", 1}, {"force", 3})),
|
||||
({"no", 0}, {"yes", 1}, {"force", 3}, {"signfs", 4})),
|
||||
OPT_FLAG("sub-scale-with-window", sub_scale_with_window, 0),
|
||||
OPT_FLAG("osd-bar", osd_bar_visible, 0),
|
||||
OPT_FLOATRANGE("osd-bar-align-x", osd_bar_align_x, 0, -1.0, +1.0),
|
||||
|
||||
@@ -70,6 +70,7 @@ struct key_entry {
|
||||
};
|
||||
|
||||
static const struct key_entry keys[] = {
|
||||
{"\010", MP_KEY_BS},
|
||||
{"\011", MP_KEY_TAB},
|
||||
{"\012", MP_KEY_ENTER},
|
||||
{"\177", MP_KEY_BS},
|
||||
|
||||
+4
-4
@@ -214,9 +214,8 @@ void reinit_audio_chain(struct MPContext *mpctx)
|
||||
init_error:
|
||||
uninit_player(mpctx, INITIALIZED_ACODEC | INITIALIZED_AO);
|
||||
no_audio:
|
||||
mp_deselect_track(mpctx, track);
|
||||
if (track)
|
||||
MP_INFO(mpctx, "Audio: no audio\n");
|
||||
error_on_track(mpctx, track);
|
||||
}
|
||||
|
||||
// Return pts value corresponding to the end point of audio written to the
|
||||
@@ -382,6 +381,7 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
|
||||
return;
|
||||
}
|
||||
reinit_audio_chain(mpctx);
|
||||
mpctx->sleeptime = 0;
|
||||
return; // try again next iteration
|
||||
}
|
||||
|
||||
@@ -520,8 +520,8 @@ void fill_audio_out_buffers(struct MPContext *mpctx, double endpts)
|
||||
// Drop data queued for output, or which the AO is currently outputting.
|
||||
void clear_audio_output_buffers(struct MPContext *mpctx)
|
||||
{
|
||||
if (mpctx->ao) {
|
||||
if (mpctx->ao)
|
||||
ao_reset(mpctx->ao);
|
||||
if (mpctx->ao_buffer)
|
||||
mp_audio_buffer_clear(mpctx->ao_buffer);
|
||||
}
|
||||
}
|
||||
@@ -266,6 +266,8 @@ void mp_get_resume_defaults(struct MPContext *mpctx)
|
||||
// Should follow what parser-cfg.c does/needs
|
||||
static bool needs_config_quoting(const char *s)
|
||||
{
|
||||
if (s[0] == '%')
|
||||
return true;
|
||||
for (int i = 0; s && s[i]; i++) {
|
||||
unsigned char c = s[i];
|
||||
if (!mp_isprint(c) || mp_isspace(c) || c == '#' || c == '\'' || c == '"')
|
||||
|
||||
@@ -425,6 +425,7 @@ void merge_playlist_files(struct playlist *pl);
|
||||
float mp_get_cache_percent(struct MPContext *mpctx);
|
||||
bool mp_get_cache_idle(struct MPContext *mpctx);
|
||||
void update_window_title(struct MPContext *mpctx, bool force);
|
||||
void error_on_track(struct MPContext *mpctx, struct track *track);
|
||||
void stream_dump(struct MPContext *mpctx);
|
||||
|
||||
// osd.c
|
||||
|
||||
@@ -175,6 +175,24 @@ void update_window_title(struct MPContext *mpctx, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
void error_on_track(struct MPContext *mpctx, struct track *track)
|
||||
{
|
||||
if (!track)
|
||||
return;
|
||||
mp_deselect_track(mpctx, track);
|
||||
if (track) {
|
||||
if (track->type == STREAM_AUDIO)
|
||||
MP_INFO(mpctx, "Audio: no audio\n");
|
||||
if (track->type == STREAM_VIDEO)
|
||||
MP_INFO(mpctx, "Video: no video\n");
|
||||
if (!mpctx->current_track[0][STREAM_AUDIO] &&
|
||||
!mpctx->current_track[0][STREAM_VIDEO])
|
||||
mpctx->stop_play = PT_NEXT_ENTRY;
|
||||
mpctx->error_playing = true;
|
||||
mpctx->sleeptime = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void stream_dump(struct MPContext *mpctx)
|
||||
{
|
||||
struct MPOpts *opts = mpctx->opts;
|
||||
|
||||
+1
-1
@@ -748,7 +748,7 @@ static void handle_sstep(struct MPContext *mpctx)
|
||||
|
||||
if (mpctx->video_status >= STATUS_EOF) {
|
||||
if (mpctx->max_frames >= 0)
|
||||
mpctx->stop_play = PT_NEXT_ENTRY;
|
||||
mpctx->stop_play = AT_END_OF_FILE; // force EOF even if audio left
|
||||
if (mpctx->step_frames > 0 && !mpctx->paused)
|
||||
pause_player(mpctx);
|
||||
}
|
||||
|
||||
+6
-6
@@ -310,7 +310,7 @@ err_out:
|
||||
no_video:
|
||||
uninit_player(mpctx, INITIALIZED_VCODEC | (opts->force_vo ? 0 : INITIALIZED_VO));
|
||||
if (track)
|
||||
mp_deselect_track(mpctx, track);
|
||||
error_on_track(mpctx, track);
|
||||
handle_force_window(mpctx, true);
|
||||
return 0;
|
||||
}
|
||||
@@ -579,7 +579,9 @@ static int video_output_image(struct MPContext *mpctx, double endpts)
|
||||
&& mpctx->video_status == STATUS_SYNCING;
|
||||
if (hrseek && img->pts < mpctx->hrseek_pts - .005)
|
||||
drop = true;
|
||||
if (endpts != MP_NOPTS_VALUE && img->pts >= endpts) {
|
||||
if ((endpts != MP_NOPTS_VALUE && img->pts >= endpts) ||
|
||||
mpctx->max_frames == 0)
|
||||
{
|
||||
drop = true;
|
||||
r = VD_EOF;
|
||||
}
|
||||
@@ -806,7 +808,7 @@ void write_video(struct MPContext *mpctx, double endpts)
|
||||
pause_player(mpctx);
|
||||
}
|
||||
if (mpctx->max_frames == 0)
|
||||
mpctx->stop_play = PT_NEXT_ENTRY;
|
||||
mpctx->stop_play = AT_END_OF_FILE;
|
||||
if (mpctx->max_frames > 0)
|
||||
mpctx->max_frames--;
|
||||
}
|
||||
@@ -820,9 +822,7 @@ error:
|
||||
if (!opts->force_vo)
|
||||
uninit |= INITIALIZED_VO;
|
||||
uninit_player(mpctx, uninit);
|
||||
if (!mpctx->current_track[STREAM_AUDIO])
|
||||
mpctx->stop_play = PT_NEXT_ENTRY;
|
||||
mpctx->error_playing = true;
|
||||
error_on_track(mpctx, mpctx->current_track[STREAM_VIDEO][0]);
|
||||
handle_force_window(mpctx, true);
|
||||
mpctx->sleeptime = 0;
|
||||
}
|
||||
+7
-4
@@ -136,13 +136,11 @@ void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts,
|
||||
float set_line_spacing = 0;
|
||||
float set_font_scale = 1;
|
||||
int set_hinting = 0;
|
||||
int set_force_override = 0;
|
||||
if (opts->ass_style_override) {
|
||||
set_use_margins = opts->ass_use_margins;
|
||||
set_sub_pos = 100 - opts->sub_pos;
|
||||
set_line_spacing = opts->ass_line_spacing;
|
||||
set_hinting = opts->ass_hinting;
|
||||
set_force_override = opts->ass_style_override == 3;
|
||||
set_font_scale = opts->sub_scale;
|
||||
if (opts->sub_scale_with_window) {
|
||||
int vidh = dim->h - (dim->mt + dim->mb);
|
||||
@@ -157,8 +155,13 @@ void mp_ass_configure(ASS_Renderer *priv, struct MPOpts *opts,
|
||||
#if LIBASS_VERSION >= 0x01000000
|
||||
ass_set_shaper(priv, opts->ass_shaper);
|
||||
#endif
|
||||
#if LIBASS_VERSION >= 0x01103000
|
||||
ass_set_selective_style_override_enabled(priv, set_force_override);
|
||||
#if LIBASS_VERSION >= 0x01103001
|
||||
int set_force_flags = 0;
|
||||
if (opts->ass_style_override == 3)
|
||||
set_force_flags |= ASS_OVERRIDE_BIT_STYLE | ASS_OVERRIDE_BIT_FONT_SIZE;
|
||||
if (opts->ass_style_override == 4)
|
||||
set_force_flags |= ASS_OVERRIDE_BIT_FONT_SIZE;
|
||||
ass_set_selective_style_override_enabled(priv, set_force_flags);
|
||||
ASS_Style style = {0};
|
||||
mp_ass_set_style(&style, 288, opts->sub_text_style);
|
||||
ass_set_selective_style_override(priv, &style);
|
||||
|
||||
Reference in new issue
Block a user