Browse code

avutil/audio_fifo: add av_warn_unused_result

This one should not trigger any warnings, but will be useful for future
robustness.

Strictly speaking, one could check the size after the call by examining
the structure instead of the return value. Such a use case is highly
unusual, and this commit may be easily reverted if there is a legitimate
need of such use.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>

Ganesh Ajjanagadde authored on 2015/10/16 08:24:14
Showing 1 changed files
... ...
@@ -73,6 +73,7 @@ AVAudioFifo *av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels,
73 73
  * @param nb_samples  new allocation size, in samples
74 74
  * @return            0 if OK, or negative AVERROR code on failure
75 75
  */
76
+av_warn_unused_result
76 77
 int av_audio_fifo_realloc(AVAudioFifo *af, int nb_samples);
77 78
 
78 79
 /**