[FFmpeg-devel] [PATCH] Do not leave positive values undefined when negative are defined as error
Michael Niedermayer
michaelni at gmx.at
Sat Oct 19 16:17:18 CEST 2013
On Wed, Oct 02, 2013 at 04:44:06PM +0000, Paul B Mahol wrote:
> On 9/16/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sun, Sep 15, 2013 at 10:40:16PM +0000, Paul B Mahol wrote:
> >> On 9/15/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> >> > Define positive return values as non errors and leave further meaning
> >> > undefined
> >> > This allows future extensions to use these values
> >> >
> >> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> >> > ---
> >> > cmdutils.h | 2 +-
> >> > libavcodec/iff.c | 2 +-
> >> > libavcodec/wmaprodec.c | 2 +-
> >> > libavfilter/avcodec.h | 6 +++---
> >> > libavfilter/avfilter.h | 2 +-
> >> > libavfilter/avfiltergraph.c | 4 ++--
> >> > libavfilter/graphparser.c | 4 ++--
> >> > libavfilter/internal.h | 10 +++++-----
> >> > libavfilter/lavfutils.h | 2 +-
> >> > libavformat/avio.h | 4 ++--
> >> > libavformat/avio_internal.h | 4 ++--
> >> > libavformat/url.h | 4 ++--
> >> > libavutil/eval.h | 4 ++--
> >> > libavutil/parseutils.h | 2 +-
> >> > 14 files changed, 26 insertions(+), 26 deletions(-)
> >> >
> >> > diff --git a/cmdutils.h b/cmdutils.h
> >> > index 3af4476..a0707bd 100644
> >> > --- a/cmdutils.h
> >> > +++ b/cmdutils.h
> >> > @@ -498,7 +498,7 @@ int read_yesno(void);
> >> > * @param filename file to read from
> >> > * @param bufptr location where pointer to buffer is returned
> >> > * @param size location where size of buffer is returned
> >> > - * @return 0 in case of success, a negative value corresponding to an
> >> > + * @return >=0 in case of success, a negative value corresponding to
> >> > an
> >>
> >> space after '='.
> >>
> >> > * AVERROR error code in case of failure.
> >> > */
> >> > int cmdutils_read_file(const char *filename, char **bufptr, size_t
> >> > *size);
> >> > diff --git a/libavcodec/iff.c b/libavcodec/iff.c
> >> > index ab2f172..9c894ef 100644
> >> > --- a/libavcodec/iff.c
> >> > +++ b/libavcodec/iff.c
> >> > @@ -184,7 +184,7 @@ static int cmap_read_palette(AVCodecContext *avctx,
> >> > uint32_t *pal)
> >> > *
> >> > * @param avctx the AVCodecContext where to extract extra context to
> >> > * @param avpkt the AVPacket to extract extra context from or NULL to
> >> > use
> >> > avctx
> >> > - * @return 0 in case of success, a negative error code otherwise
> >> > + * @return >=0 in case of success, a negative error code otherwise
> >>
> >> ditto
> >>
> >> > */
> >> > static int extract_header(AVCodecContext *const avctx,
> >> > const AVPacket *const avpkt) {
> >> > diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
> >> > index 4bd2d36..6014fe1 100644
> >> > --- a/libavcodec/wmaprodec.c
> >> > +++ b/libavcodec/wmaprodec.c
> >> > @@ -678,7 +678,7 @@ static void
> >> > decode_decorrelation_matrix(WMAProDecodeCtx
> >> > *s,
> >> > /**
> >> > *@brief Decode channel transformation parameters
> >> > *@param s codec context
> >> > - *@return 0 in case of success, < 0 in case of bitstream errors
> >> > + *@return >=0 in case of success, < 0 in case of bitstream errors
> >>
> >> ditto for this and rest
> >
> > fixed locally
>
> I guess it does not need major bump so it can be applied?
applied
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131019/def6351e/attachment.asc>
More information about the ffmpeg-devel
mailing list