[MPlayer-users] pulseaudio failing at passthrough

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Feb 14 22:11:27 CET 2014

On Fri, Feb 14, 2014 at 08:32:04PM +0100, Alexander Roalter wrote:
> On 14.02.2014 20:14, Reimar Döffinger wrote:
> >On Fri, Feb 14, 2014 at 08:11:03PM +0100, Reimar Döffinger wrote:
> >>On Thu, Feb 13, 2014 at 10:52:50PM +0100, Alexander Roalter wrote:
> >>>If I play back AC3 audio with ao pulse and S/PDIF passthrough, I get
> >>
> >>Passthrough with pulseaudio is a mess, it requires us to use a new API,
> >>which means either detecting if it is available or dropping support
> >>for old versions
> >
> >I just realized that passthrough in pulseaudio was only added last year,
> >so removing support for old versions definitely isn't an option.
> >Also, unless I can get passthrough to work on my system (didn't work out
> >so far) I definitely won't be working on this.
> Thanks for the info about this.
> I would happily switch back to alsa, if it weren't for the strage
> reinitialization thing it does whenever I seek,

That is probably your hardware and unavoidable. Kind of.

> and the thing dvdnav
> does on chapter break.

That is because the dvdnav code is, if I speak my mind honestly,
a bug-riddled obfuscated piece of crap with no documentation
that would allow to figure out whether there is some sense behind
the obviously nonsense pieces of code or if they should just
be removed...
I think if you do this change below this will avoid the issue, but it
may or may not break something else.
--- stream/stream_dvdnav.c
+++ stream/stream_dvdnav.c
@@ -300,7 +300,6 @@ static int fill_buffer(stream_t *s, char *but, int len)
           int tit = 0, part = 0;
           dvdnav_vts_change_event_t *vts_event = (dvdnav_vts_change_event_t *)s->buffer;
           mp_msg(MSGT_CPLAYER,MSGL_INFO, "DVDNAV, switched to title: %d\r\n", vts_event->new_vtsN);
-          priv->state |= NAV_FLAG_CELL_CHANGE;
           priv->state |= NAV_FLAG_AUDIO_CHANGE;
           priv->state |= NAV_FLAG_SPU_CHANGE;
           priv->state |= NAV_FLAG_STREAM_CHANGE;

Or a probably safer alternative:
--- mplayer.c
+++ mplayer.c
@@ -1953,7 +1953,9 @@ static void mp_dvdnav_reset_stream(MPContext *ctx)
         ctx->demuxer->stream_pts = MP_NOPTS_VALUE;
-    if (ctx->sh_audio) {
+    // disable since it causes issues like audio stutter
+    // on each chapter change
+    if (0 && ctx->sh_audio) {
         // free audio packets and reset
         audio_delay -= ctx->sh_audio->stream_delay;

More information about the MPlayer-users mailing list