[pulseaudio-discuss] [PATCH] match: Use the SINK_INPUT_FIXATE hook instead of NEW.

Arun Raghavan arun.raghavan at collabora.co.uk
Mon Oct 29 19:54:37 PDT 2012


On Mon, 2012-10-29 at 21:03 +0200, Tanu Kaskinen wrote:
> On Mon, 2012-10-29 at 19:57 +0530, Arun Raghavan wrote:
> > On Thu, 2012-09-27 at 16:41 +0300, Tanu Kaskinen wrote:
> > > The callback relies on the sample spec being finalized, which is not
> > > true with the NEW hook.
> > > 
> > > BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=55135
> > > ---
> > >  src/modules/module-match.c |    2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/src/modules/module-match.c b/src/modules/module-match.c
> > > index c94ef79..9f76b5d 100644
> > > --- a/src/modules/module-match.c
> > > +++ b/src/modules/module-match.c
> > > @@ -264,7 +264,7 @@ int pa__init(pa_module*m) {
> > >          goto fail;
> > >  
> > >      /* hook EARLY - 1, to match before stream-restore */
> > 
> > Given this comment, does this change break things with respect to m-s-r?
> 
> No. I left a comment on the bug, did you see that?

I did indeed miss it.

> > > -    u->sink_input_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_NEW], PA_HOOK_EARLY - 1, (pa_hook_cb_t) sink_input_new_hook_callback, u);
> > > +    u->sink_input_new_hook_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SINK_INPUT_FIXATE], PA_HOOK_EARLY - 1, (pa_hook_cb_t) sink_input_new_hook_callback, u);
> > 
> > Also, probably want to change the hook variable and function names with
> > s/new/fixate.
> 
> Good catch, will fix.

Thanks. Please go ahead and push it out after that.

Regards,
Arun



More information about the pulseaudio-discuss mailing list