On 11/30/2012 05:47 AM, Anton Khirnov wrote:
> 
> On Thu, 29 Nov 2012 15:08:04 -0500, Justin Ruggles <[email protected]> 
> wrote:
>> ---
>>  libavresample/avresample.h |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/libavresample/avresample.h b/libavresample/avresample.h
>> index affeeeb..a73d686 100644
>> --- a/libavresample/avresample.h
>> +++ b/libavresample/avresample.h
>> @@ -216,6 +216,9 @@ int avresample_build_matrix(uint64_t in_layout, uint64_t 
>> out_layout,
>>  /**
>>   * Get the current channel mixing matrix.
>>   *
>> + * If no custom matrix has been previously set or the 
>> AVAudioResampleContext is
>> + * not open, an error is returned.
> 
> Ok
> 
>> + *
>>   * @param avr     audio resample context
>>   * @param matrix  mixing coefficients; matrix[i + stride * o] is the weight 
>> of
>>   *                input channel i in output channel o.
>> @@ -231,7 +234,8 @@ int avresample_get_matrix(AVAudioResampleContext *avr, 
>> double *matrix,
>>   * Allows for setting a custom mixing matrix, overriding the default matrix
>>   * generated internally during avresample_open(). This function can be 
>> called
>>   * anytime on an allocated context, either before or after calling
>> - * avresample_open(). avresample_convert() always uses the current matrix.
>> + * avresample_open(), as long as the channel layouts have been set.
>> + * avresample_convert() always uses the current matrix.
> 
> 
> Why bother mentioning this explicitly? If the channel layouts are not set,
> avresample_open() will fail and avresample_convert() cannot be called at all.

Because avresample_get/set_matrix() can be called before
avresample_open(). So if the user wants to do that they just have to
make sure they set the layouts first.

-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to