[FFmpeg-devel] [PATCH] avutil/audio_fifo: add av_warn_unused_result

Ganesh Ajjanagadde gajjanag at mit.edu
Thu Oct 29 04:08:15 CET 2015


On Fri, Oct 16, 2015 at 5:16 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Fri, Oct 16, 2015 at 11:44 AM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
>> On Thu, Oct 15, 2015 at 07:26:04PM -0400, Ganesh Ajjanagadde wrote:
>>> This one should not trigger any warnings, but will be useful for future
>>> robustness.
>>>
>>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>>> ---
>>>  libavutil/audio_fifo.h | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/libavutil/audio_fifo.h b/libavutil/audio_fifo.h
>>> index d93be2a..24f91da 100644
>>> --- a/libavutil/audio_fifo.h
>>> +++ b/libavutil/audio_fifo.h
>>> @@ -73,6 +73,7 @@ AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
>>>   * @param nb_samples  new allocation size, in samples
>>>   * @return            0 if OK, or negative AVERROR code on failure
>>>   */
>>> +av_warn_unused_result
>>>  int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
>>
>> probably ok
>> strictly speaking one could check the size after the call instead of
>> the returb value i think
>
> I guess so, but that is an unusual use as far as I can tell. Will
> leave it up to someone else before pushing. If no one replies in the
> next 48 h, I will push.

pushed with the above caveat mentioned in the commit message.

>
>>
>> [...]
>> --
>> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>
>> It is what and why we do it that matters, not just one of them.
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>


More information about the ffmpeg-devel mailing list