Compare commits
11
Commits
harmony-port
...
v0.34.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
349e437466 | ||
|
|
f47a055440 | ||
|
|
80c03b49bf | ||
|
|
e7fbc86d58 | ||
|
|
85a4557369 | ||
|
|
7c0a9b8ff7 | ||
|
|
f2bc9e4dd1 | ||
|
|
f8b85dd65d | ||
|
|
bde10d2771 | ||
|
|
22c1468b5a | ||
|
|
01843cf9e7 |
No files matched your search
+23
-3
@@ -1,3 +1,23 @@
|
||||
Release 0.34.1
|
||||
==============
|
||||
|
||||
Bug fix release for the 0.34 branch.
|
||||
|
||||
Fixes and Minor Enhancements
|
||||
----------------------------
|
||||
|
||||
- player: fix autofit/geometry related segfault
|
||||
- ao_oss: add missing PATH_DEV_MIXER define
|
||||
- egl_helpers: fix context creation if GLES 3 is not available
|
||||
- audio: stop corrupting audio on underreads
|
||||
- wayland: fix a potential segfault on surface enter
|
||||
- vo_gpu: opengl: fix wrong glMemoryBarrier call
|
||||
- vo_gpu: opengl: create context at version 4.4 again
|
||||
- af_lavcac3enc: fix memory leak on no-op
|
||||
- subprocess: unblock/reset signals before running child process
|
||||
- wayland: avoid doing unneccesary window resizes
|
||||
|
||||
|
||||
Release 0.34.0
|
||||
==============
|
||||
|
||||
@@ -140,7 +160,7 @@ This listing is not complete. Check DOCS/client-api-changes.rst for a history
|
||||
of changes to the client API, and DOCS/interface-changes.rst for a history
|
||||
of changes to other user-visible interfaces.
|
||||
|
||||
A complete changelog can be seen by running `git log v0.33.0..v0.34.0`
|
||||
A complete changelog can be seen by running `git log v0.33.0..v0.34.1`
|
||||
in the git repository or by visiting either
|
||||
https://github.com/mpv-player/mpv/compare/v0.33.0...v0.34.0 or
|
||||
https://git.srsfckn.biz/mpv/log/?qt=range&q=v0.33.0..v0.34.0
|
||||
https://github.com/mpv-player/mpv/compare/v0.33.0...v0.34.1 or
|
||||
https://git.srsfckn.biz/mpv/log/?qt=range&q=v0.33.0..v0.34.1
|
||||
@@ -163,46 +163,47 @@ static void process(struct mp_filter *f)
|
||||
break;
|
||||
if (lavc_ret < 0 && lavc_ret != AVERROR(EAGAIN)) {
|
||||
MP_FATAL(f, "Encode failed (receive).\n");
|
||||
goto done;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
AVFrame *frame = NULL;
|
||||
struct mp_frame input = mp_pin_out_read(s->in_pin);
|
||||
// The following code assumes no sample data buffering in the encoder.
|
||||
if (input.type == MP_FRAME_EOF) {
|
||||
switch (input.type) {
|
||||
case MP_FRAME_NONE:
|
||||
goto done; // no data yet
|
||||
case MP_FRAME_EOF:
|
||||
mp_pin_in_write(f->ppins[1], input);
|
||||
return;
|
||||
} else if (input.type == MP_FRAME_AUDIO) {
|
||||
goto done;
|
||||
case MP_FRAME_AUDIO:
|
||||
TA_FREEP(&s->in_frame);
|
||||
s->in_frame = input.data;
|
||||
frame = mp_frame_to_av(input, NULL);
|
||||
if (!frame)
|
||||
goto done;
|
||||
goto error;
|
||||
if (mp_aframe_get_channels(s->in_frame) < s->opts->min_channel_num) {
|
||||
// Just pass it through.
|
||||
s->in_frame = NULL;
|
||||
mp_pin_in_write(f->ppins[1], input);
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
if (!mp_aframe_config_equals(s->in_frame, s->cur_format)) {
|
||||
if (!reinit(f))
|
||||
goto done;
|
||||
goto error;
|
||||
}
|
||||
} else if (input.type) {
|
||||
goto done;
|
||||
} else {
|
||||
return; // no data yet
|
||||
break;
|
||||
default: goto error; // unexpected packet type
|
||||
}
|
||||
int lavc_ret = avcodec_send_frame(s->lavc_actx, frame);
|
||||
av_frame_free(&frame);
|
||||
if (lavc_ret < 0 && lavc_ret != AVERROR(EAGAIN)) {
|
||||
MP_FATAL(f, "Encode failed (send).\n");
|
||||
goto done;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if (!s->in_frame)
|
||||
goto done;
|
||||
goto error;
|
||||
|
||||
out = mp_aframe_create();
|
||||
mp_aframe_set_format(out, AF_FORMAT_S_AC3);
|
||||
@@ -210,7 +211,7 @@ static void process(struct mp_filter *f)
|
||||
mp_aframe_set_rate(out, 48000);
|
||||
|
||||
if (mp_aframe_pool_allocate(s->out_pool, out, s->out_samples) < 0)
|
||||
goto done;
|
||||
goto error;
|
||||
|
||||
int sstride = mp_aframe_get_sstride(out);
|
||||
|
||||
@@ -239,7 +240,7 @@ static void process(struct mp_filter *f)
|
||||
|
||||
uint8_t **planes = mp_aframe_get_data_rw(out);
|
||||
if (!planes)
|
||||
goto done;
|
||||
goto error;
|
||||
char *buf = planes[0];
|
||||
memcpy(buf, hdr, header_len);
|
||||
memcpy(buf + header_len, pkt.data, pkt.size);
|
||||
@@ -250,8 +251,10 @@ static void process(struct mp_filter *f)
|
||||
mp_pin_in_write(f->ppins[1], MAKE_FRAME(MP_FRAME_AUDIO, out));
|
||||
out = NULL;
|
||||
|
||||
err = 0;
|
||||
done:
|
||||
err = false;
|
||||
// fall through
|
||||
error:
|
||||
av_packet_unref(&pkt);
|
||||
talloc_free(out);
|
||||
if (err)
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#endif
|
||||
|
||||
#define PATH_DEV_DSP "/dev/dsp"
|
||||
#define PATH_DEV_MIXER "/dev/mixer"
|
||||
|
||||
struct priv {
|
||||
int dsp_fd;
|
||||
|
||||
+2
-1
@@ -162,7 +162,8 @@ static int read_buffer(struct ao *ao, void **data, int samples, bool *eof)
|
||||
|
||||
// pad with silence (underflow/paused/eof)
|
||||
for (int n = 0; n < ao->num_planes; n++) {
|
||||
af_fill_silence((char *)data[n] + pos, (samples - pos) * ao->sstride,
|
||||
af_fill_silence((char *)data[n] + pos * ao->sstride,
|
||||
(samples - pos) * ao->sstride,
|
||||
ao->format);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
|
||||
extern char **environ;
|
||||
|
||||
#ifdef SIGRTMAX
|
||||
#define SIGNAL_MAX SIGRTMAX
|
||||
#else
|
||||
#define SIGNAL_MAX 32
|
||||
#endif
|
||||
|
||||
#define SAFE_CLOSE(fd) do { if ((fd) >= 0) close((fd)); (fd) = -1; } while (0)
|
||||
|
||||
// Async-signal-safe execvpe(). POSIX does not list it as async-signal-safe
|
||||
@@ -65,6 +71,20 @@ static int as_execvpe(const char *path, const char *file, char *const argv[],
|
||||
return -1;
|
||||
}
|
||||
|
||||
// In the child process, resets the signal mask to defaults. Also clears any
|
||||
// signal handlers first so nothing funny happens.
|
||||
static void reset_signals_child(void)
|
||||
{
|
||||
struct sigaction sa = { 0 };
|
||||
sigset_t sigmask;
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigemptyset(&sigmask);
|
||||
|
||||
for (int nr = 1; nr < SIGNAL_MAX; nr++)
|
||||
sigaction(nr, &sa, NULL);
|
||||
sigprocmask(SIG_SETMASK, &sigmask, NULL);
|
||||
}
|
||||
|
||||
// Returns 0 on any error, valid PID on success.
|
||||
// This function must be async-signal-safe, as it may be called from a fork().
|
||||
static pid_t spawn_process(const char *path, struct mp_subprocess_opts *opts,
|
||||
@@ -96,6 +116,7 @@ static pid_t spawn_process(const char *path, struct mp_subprocess_opts *opts,
|
||||
}
|
||||
if (fres == 0) {
|
||||
// child
|
||||
reset_signals_child();
|
||||
|
||||
for (int n = 0; n < opts->num_fds; n++) {
|
||||
if (src_fds[n] == opts->fds[n].fd) {
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
// 0-terminated list of desktop GL versions a backend should try to
|
||||
// initialize. Each entry is the minimum required version.
|
||||
const int mpgl_min_required_gl_versions[] = {
|
||||
/*
|
||||
* Nvidia drivers will not provide the highest supported version
|
||||
* when 320 core is requested. Instead, it just returns 3.2. This
|
||||
* would be bad, as we actually want compute shaders that require
|
||||
* 4.2, so we have to request a sufficiently high version. We use
|
||||
* 440 to maximise driver compatibility as we don't need anything
|
||||
* from newer versions.
|
||||
*/
|
||||
440,
|
||||
320,
|
||||
210,
|
||||
0
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD
|
||||
#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001
|
||||
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1
|
||||
#define EGL_OPENGL_ES3_BIT 0x00000040
|
||||
typedef intptr_t EGLAttrib;
|
||||
#endif
|
||||
|
||||
@@ -117,7 +116,7 @@ static bool create_context(struct ra_ctx *ctx, EGLDisplay display,
|
||||
name = "Desktop OpenGL";
|
||||
} else {
|
||||
api = EGL_OPENGL_ES_API;
|
||||
rend = EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT;
|
||||
rend = EGL_OPENGL_ES2_BIT;
|
||||
name = "GLES 2.x +";
|
||||
}
|
||||
|
||||
|
||||
@@ -989,7 +989,7 @@ static void update_uniform(struct ra *ra, struct ra_renderpass *pass,
|
||||
gl->BindBufferBase(buf_gl->target, input->binding, buf_gl->buffer);
|
||||
// SSBOs are not implicitly coherent in OpengL
|
||||
if (input->type == RA_VARTYPE_BUF_RW)
|
||||
gl->MemoryBarrier(buf_gl->target);
|
||||
gl->MemoryBarrier(GL_SHADER_STORAGE_BARRIER_BIT);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
+11
-12
@@ -653,9 +653,6 @@ static void output_handle_done(void* data, struct wl_output *wl_output)
|
||||
}
|
||||
spawn_cursor(wl);
|
||||
set_geometry(wl);
|
||||
wl->window_size = wl->vdparams;
|
||||
if (!wl->vo_opts->fullscreen && !wl->vo_opts->window_maximized)
|
||||
wl->geometry = wl->window_size;
|
||||
wl->pending_vo_events |= VO_EVENT_DPI;
|
||||
wl->pending_vo_events |= VO_EVENT_RESIZE;
|
||||
}
|
||||
@@ -685,6 +682,9 @@ static void surface_handle_enter(void *data, struct wl_surface *wl_surface,
|
||||
struct wl_output *output)
|
||||
{
|
||||
struct vo_wayland_state *wl = data;
|
||||
if (!wl->current_output)
|
||||
return;
|
||||
|
||||
struct mp_rect old_output_geometry = wl->current_output->geometry;
|
||||
struct mp_rect old_geometry = wl->geometry;
|
||||
wl->current_output = NULL;
|
||||
@@ -713,13 +713,9 @@ static void surface_handle_enter(void *data, struct wl_surface *wl_surface,
|
||||
|
||||
if (!mp_rect_equals(&old_output_geometry, &wl->current_output->geometry)) {
|
||||
set_geometry(wl);
|
||||
wl->window_size = wl->vdparams;
|
||||
force_resize = true;
|
||||
}
|
||||
|
||||
if (!wl->vo_opts->fullscreen && !wl->vo_opts->window_maximized)
|
||||
wl->geometry = wl->window_size;
|
||||
|
||||
if (!mp_rect_equals(&old_geometry, &wl->geometry) || force_resize)
|
||||
wl->pending_vo_events |= VO_EVENT_RESIZE;
|
||||
|
||||
@@ -1370,6 +1366,7 @@ static int set_cursor_visibility(struct vo_wayland_state *wl, bool on)
|
||||
static void set_geometry(struct vo_wayland_state *wl)
|
||||
{
|
||||
struct vo *vo = wl->vo;
|
||||
assert(wl->current_output);
|
||||
|
||||
struct vo_win_geometry geo;
|
||||
struct mp_rect screenrc = wl->current_output->geometry;
|
||||
@@ -1597,11 +1594,13 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg)
|
||||
if (opt == &opts->geometry || opt == &opts->autofit ||
|
||||
opt == &opts->autofit_smaller || opt == &opts->autofit_larger)
|
||||
{
|
||||
set_geometry(wl);
|
||||
wl->window_size = wl->vdparams;
|
||||
if (!wl->vo_opts->fullscreen && !wl->vo_opts->window_maximized)
|
||||
wl->geometry = wl->window_size;
|
||||
wl->pending_vo_events |= VO_EVENT_RESIZE;
|
||||
if (wl->current_output) {
|
||||
set_geometry(wl);
|
||||
wl->window_size = wl->vdparams;
|
||||
if (!wl->vo_opts->fullscreen && !wl->vo_opts->window_maximized)
|
||||
wl->geometry = wl->window_size;
|
||||
wl->pending_vo_events |= VO_EVENT_RESIZE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return VO_TRUE;
|
||||
|
||||
@@ -1847,6 +1847,9 @@ static void vo_x11_set_geometry(struct vo *vo)
|
||||
{
|
||||
struct vo_x11_state *x11 = vo->x11;
|
||||
|
||||
if (!x11->window)
|
||||
return;
|
||||
|
||||
if (x11->opts->window_maximized) {
|
||||
x11->pending_geometry_change = true;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user