On Thu, Oct 15, 2015 at 07:20:30PM -0400, Ganesh Ajjanagadde wrote: > This will trigger a bunch of warnings (rightfully so). This API has been > abused, see the Doxygen comment above for what to do if the error code > is not meant to be checked. > > Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com> > --- > libavutil/pixdesc.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavutil/pixdesc.h b/libavutil/pixdesc.h > index a6056fe..975fbf2 100644 > --- a/libavutil/pixdesc.h > +++ b/libavutil/pixdesc.h > @@ -297,6 +297,7 @@ enum AVPixelFormat av_pix_fmt_desc_get_id(const > AVPixFmtDescriptor *desc); > * > * @return 0 on success, AVERROR(ENOSYS) on invalid or unknown pixel format > */ > +av_warn_unused_result > int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, > int *h_shift, int *v_shift);
if the caller knows the pixel format is valid (and non hw accel) then there is no need to check the return code in many cases this is true, like a decoder that set the pix_fmt itself it can be sure all possible values are valid [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel