On So, Jan 15, 2012 at 21:33:12 (CET), Justin Ruggles wrote:

> On 01/15/2012 03:23 PM, Reinhard Tartler wrote:
>
>> Do not fail audio decoding with avcodec_decode_audio3 if user has set a
>> custom get_buffer. Strictly speaking, this was never allowed by the API,
>> but it seems that some software packages did so anyways. In order to
>> unbreak applications (cf. http://bugs.debian.org/655890), this change
>> clarifies the API and overrides the custom get_buffer() with the defaults.
>> 
>> This change is inspired by a similar
>> commit (c3846e3ebab610be691adb8b40d376dc2f675dc4) in FFmpeg.
>> 
>> Signed-off-by: Reinhard Tartler <[email protected]>
>> ---
>>  libavcodec/avcodec.h |    5 +++++
>>  libavcodec/utils.c   |    8 +++++---
>>  2 files changed, 10 insertions(+), 3 deletions(-)
>> 
>> Justin's comments are incorporated into this version
>> 
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index c195ad5..83752cd 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -4070,6 +4070,11 @@ int avcodec_open2(AVCodecContext *avctx, AVCodec 
>> *codec, AVDictionary **options)
>>   * @warning The end of the input buffer avpkt->data should be set to 0 to 
>> ensure that
>>   * no overreading happens for damaged MPEG streams.
>>   *
>> + * @warning You must not provide a custom get_buffer() when using
>> + * avcodec_decode_audio3().  Doing so will (silently) override it with
>
>
> logging 2 error messages doesn't seem "silent" to me. ;)

pushed without that part, after Justing OK'ing it on IRC.

Cheers,
Reinhard
-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to