[FFmpeg-devel] [PATCH] avformat/avio_internal: add av_warn_unused_result to ffio_ensure_seekback

Ganesh Ajjanagadde gajjanag at mit.edu
Sun Nov 15 22:00:39 CET 2015


On Sun, Nov 15, 2015 at 3:04 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Sun, Nov 15, 2015 at 01:13:43PM -0500, Ganesh Ajjanagadde wrote:
>> This will trigger a few warnings that need to be fixed, as this function
>> can return AVERROR(ENOMEM).
>>
>> --------------------------------------------------------------
>> Inspired by a patch sent by Paul for the IVR demuxer.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>>  libavformat/avio_internal.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h
>> index ad50567..655f38a 100644
>> --- a/libavformat/avio_internal.h
>> +++ b/libavformat/avio_internal.h
>> @@ -102,6 +102,7 @@ int ffio_set_buf_size(AVIOContext *s, int buf_size);
>>   * within the current pos and pos+buf_size is possible.
>>   * Once the stream position moves outside this window this guarantee is lost.
>>   */
>> +av_warn_unused_result
>>  int ffio_ensure_seekback(AVIOContext *s, int64_t buf_size);
>
> LGTM
>
> (would be ideal to fix the cases that would result in warnings before
>  pushing this)

True. Will submit separate patch later, and once that is oked, will push.

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Democracy is the form of government in which you can choose your dictator
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list