[FFmpeg-devel] [PATCH] Implement av_strerror()
Måns Rullgård
mans
Mon Mar 15 15:17:49 CET 2010
Michael Niedermayer <michaelni at gmx.at> writes:
> 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?
No.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list