[FFmpeg-devel] [PATCH] Implement av_strerror()
Michael Niedermayer
michaelni
Mon Mar 15 15:11:12 CET 2010
On Sun, Mar 14, 2010 at 10:08:46PM +0100, Stefano Sabatini wrote:
> 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.
i think the test prog can be droped
[...]
> + *errbuf = 0;
is this needed?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100315/3ef7f18b/attachment.pgp>
More information about the ffmpeg-devel
mailing list