[FFmpeg-devel] [PATCH] lavfi/af_aconvert: update audio->channels.

Michael Niedermayer michaelni at gmx.at
Thu Dec 20 16:59:01 CET 2012


On Thu, Dec 20, 2012 at 04:47:18PM +0100, Nicolas George wrote:
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  libavfilter/af_aconvert.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> 
> Fix some random assert failures added by the previous patch.
> 
> By the way, I believe the real culprit here is
> avfilter_copy_buffer_ref_props(): it seems like a rather bad idea in
> general.
> 
> 
> diff --git a/libavfilter/af_aconvert.c b/libavfilter/af_aconvert.c
> index 54f1fcd..e41095f 100644
> --- a/libavfilter/af_aconvert.c
> +++ b/libavfilter/af_aconvert.c
> @@ -147,6 +147,7 @@ static int  filter_frame(AVFilterLink *inlink, AVFilterBufferRef *insamplesref)
>                          (void *)insamplesref->data, n);
>  
>      avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
> +    outsamplesref->audio->channels       = outlink->channels;
>      outsamplesref->audio->channel_layout = outlink->channel_layout;

LGTM

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- 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/20121220/71033408/attachment.asc>


More information about the ffmpeg-devel mailing list