> > > I'm using libswresample to convert audio between different sample format > (planar format to packed format). > > To init swcontext I need input audio channel_layout. > > But today I found a video, when avcode_open called on it to get audio > codec, the returned AVCodecContext > has channels field 1, but channle_layout 0. > > Since 0 channle_layout will cause swcontext init error, I'd like to know > what 1 channels but 0 channel_layout means > and if there's a workaround so that I can call sw resample successfully? > > If your channel layout is 0, I think you can just simply fall back to using av_get_default_channel_layout(codecCtx->channels)
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
