[FFmpeg-devel] ffplay: fix order of operations for sdl audio open

Michael Niedermayer michaelni at gmx.at
Sat Oct 1 22:07:33 CEST 2011

On Sat, Oct 01, 2011 at 09:41:00PM +0200, Marton Balint wrote:
> Hi,
> The patch in the subject (3715e675) seems broken in some ways:
>  - The sample rate / channel count sanity check is not against the
>    actually used sample rate / channel count.
>  - Avctx->request_channels can affect the number of the channels,
>    therefore downmixing of 5.1 audio to stereo (default for ffplay)
>    currently does not work because of the patch.
> Isn't the aac decoder should be fixed instead of ffplay to return
> the proper number of channels after calling avcodec_open2?

The aac decoder in this bug has incorrect extradata that lists a wrong
channel number, i saw no way it could detect this easily.

my reasoning that lead to the commited fix was that av_find_stream_info()
figured out the correct channel number by decoding the first frame
and the requent_channel value should be passed to it.
If this is done it should be more reliable than trusting the decoder
before it saw the first frame

if you want to try or have a better idea:

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111001/e37e9c20/attachment.asc>

More information about the ffmpeg-devel mailing list