[vlc-devel] [PATCH 2/2] avcodec: initialize buffers when first frame comes in
ileoo at videolan.org
Fri Sep 20 15:40:18 CEST 2013
On Fri, Sep 20, 2013 at 11:04:28AM +0200, Rémi Denis-Courmont wrote:
> Currently, the transcode plugin does not seem to handle correctly the case
> whereby the output format of an audio decoder changes. It just assumes the
> audio format is set by the decoder in pf_activate() and never changes. Both
> of those assumptions are of course wrong.
Yes you are right. I'm planning to implement similar format check that
video side does currently (if format changes, reinit filter chain).
> Tweaking the avcodec encoder will not really solve the problem. Filters
> will still break, other encoder plugins will still break, and even avcodec
> will still break if the audio format changes dynamically.
It doesn't, but as avcodec is mostly used and it uses given
i_channels for buffer allocation, I tought it would be better to
allocate those buffers in place where we always should have non-zero
But it could be better just to implement that format change check in
transcoder at first and then make sure in avcodec-module that we have
buffers if we need them.
"We all know Linux is great...it does infinite loops in 5 seconds."
(Linus Torvalds about the superiority of Linux on the Amsterdam
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 490 bytes
Desc: Digital signature
More information about the vlc-devel