On 01/08/2013 09:36 AM, Anton Khirnov wrote: > + * Audio: > + * > + * Decoders request a buffer of a particular size by setting > + * AVFrame.nb_samples prior to calling get_buffer2(). The decoder may, > + * however, utilize only part of the buffer by setting AVFrame.nb_samples > + * to a smaller value in the output frame.
I think we should also go-ahead and add an option for the decoder to request a buffer for a particular channel layout by setting AVFrame.channel_layout, otherwise get_buffer2() is to use AVCodecContext.channel_layout and/or AVCodecContext.channels. This will allow separation of parsers and request_channels/request_channel_layout. The parser will just be able to set the value(s) as parsed and not have to use specific knowledge of what channel layout the decoder might actually return. Currently there are issues if the parser does not mimic decoder behavior for request_channels if the user reuses the libavformat AVCodecContexts for decoding. Thanks, Justin _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
