Linux Media Controller development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: hans.verkuil@cisco.com, linux-media@vger.kernel.org
Subject: Re: [bug report] [media] mxb: fix audio handling
Date: Wed, 10 Apr 2019 14:39:34 +0300	[thread overview]
Message-ID: <20190410113934.GC31633@kadam> (raw)
In-Reply-To: <9b5791ce-6de7-c769-ac14-2b155a44a438@xs4all.nl>

On Wed, Apr 10, 2019 at 01:24:44PM +0200, Hans Verkuil wrote:
> On 4/10/19 1:09 PM, Dan Carpenter wrote:
> > [ Hi Hans,
> > 
> >   This might not really be your bug, but I just respect you a lot and
> >   so I always come to you with questions and for advice.  -dan ]
> 
> Hmm, in other words, I'm too nice!
> 

Indeed.

> >     657                  if (mxb->cur_audinput != a->index) {
> >     658                          mxb->cur_audinput = a->index;
> >                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > Now here's the complication.  We also use a->index as an index into the
> > mxb_inputs[] array which only has MXB_INPUTS (4) elements, so just
> 
> We do? Where does that happen? I don't see that in the code. That would be
> a bug since mxb_inputs are the video inputs, whereas s_audio deals with
> audio inputs.
> 

Oh, you're right.  But then there is a smaller problem because we use
it as in index into the mxb_audios[] array and that array only has 6
elements so we're still out of bounds.  The bigger array has a mute
element at the end.

regards,
dan carpenter


      reply	other threads:[~2019-04-10 11:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 11:09 [bug report] [media] mxb: fix audio handling Dan Carpenter
2019-04-10 11:24 ` Hans Verkuil
2019-04-10 11:39   ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190410113934.GC31633@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox