[FFmpeg-devel] [PATCH] Implement av_strerror()
Stefano Sabatini
stefano.sabatini-lala
Sun Mar 14 22:08:46 CET 2010
On date Sunday 2010-03-14 19:22:19 +0100, Michael Niedermayer encoded:
> On Sun, Mar 14, 2010 at 07:12:07PM +0100, Stefano Sabatini wrote:
> > On date Sunday 2010-03-14 15:52:41 +0000, M?ns Rullg?rd encoded:
> > > Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> [...]
> > +
> > +int av_strerror(int errnum, char *errbuf, size_t errbuf_size)
> > +{
> > + int ret = 0;
> > + const char *errstr = NULL;
> > + *errbuf = 0;
> > +
> > + switch (errnum) {
>
> > +#if LIBAVUTIL_VERSION_MAJOR < 51
> > + case AVERROR_IO: errstr = "I/O error"; break;
> > + case AVERROR_NOENT: errstr = "No such file or directory"; break;
> > + case AVERROR_NOMEM: errstr = "Not enough memory"; break;
> > +#endif
>
> Is that what strerror_r() prints not good?
Updated.
I added also a test program (see the output as attachment), let me
know if I have to keep it in the commit.
Regards.
--
FFmpeg = Faithless & Fierce Mere Practical Ecstatic Geek
More information about the ffmpeg-devel
mailing list