int av_strerror(int errnum, char *errbuf, size_t errbuf_size)

{

    int ret = 0;

    const char *errstr = NULL;



    switch (errnum) {

    case AVERROR_EOF:               errstr = "End of file"; break;

    case AVERROR_INVALIDDATA:       errstr = "Invalid data found when processing input"; break;

    case AVERROR_NUMEXPECTED:       errstr = "Number syntax expected in filename"; break;

    case AVERROR_PATCHWELCOME:      errstr = "Not yet implemented in FFmpeg, patches welcome"; break;

    }



    if (errstr) {

        av_strlcpy(errbuf, errstr, errbuf_size);

    } else {

#if HAVE_STRERROR_R

        ret = strerror_r(AVUNERROR(errnum), errbuf, errbuf_size);

#endif

        if (!HAVE_STRERROR_R || ret < 0)

            snprintf(errbuf, errbuf_size, "Error number %d occurred", errnum);

    }



    return ret;

}

int av_strerror(int errnum, char *errbuf, size_t errbuf_size)

{

    int ret = 0;

    const char *errstr = NULL;



    switch (errnum) {

    case AVERROR_EOF:               errstr = "End of file"; break;

    case AVERROR_INVALIDDATA:       errstr = "Invalid data found when processing input"; break;

    case AVERROR_NUMEXPECTED:       errstr = "Number syntax expected in filename"; break;

    case AVERROR_PATCHWELCOME:      errstr = "Not yet implemented in FFmpeg, patches welcome"; break;

    }



    if (errstr) {

        av_strlcpy(errbuf, errstr, errbuf_size);

    } else {

#if HAVE_STRERROR_R

        ret = strerror_r(AVUNERROR(errnum), errbuf, errbuf_size);

#endif

        if (!HAVE_STRERROR_R || ret < 0)

            snprintf(errbuf, errbuf_size, "Error number %d occurred", errnum);

    }



    return ret;

}

int FUNC_0(int VAR_0, char *VAR_1, size_t VAR_2)

{

    int VAR_3 = 0;

    const char *VAR_4 = NULL;



    switch (VAR_0) {

    case AVERROR_EOF:               VAR_4 = "End of file"; break;

    case AVERROR_INVALIDDATA:       VAR_4 = "Invalid data found when processing input"; break;

    case AVERROR_NUMEXPECTED:       VAR_4 = "Number syntax expected in filename"; break;

    case AVERROR_PATCHWELCOME:      VAR_4 = "Not yet implemented in FFmpeg, patches welcome"; break;

    }



    if (VAR_4) {

        av_strlcpy(VAR_1, VAR_4, VAR_2);

    } else {

#if HAVE_STRERROR_R

        VAR_3 = strerror_r(AVUNERROR(VAR_0), VAR_1, VAR_2);

#endif

        if (!HAVE_STRERROR_R || VAR_3 < 0)

            snprintf(VAR_1, VAR_2, "Error number %d occurred", VAR_0);

    }



    return VAR_3;

}

int FUNC_0(int VAR_0, char *VAR_1, size_t VAR_2)
{ int VAR_3 = 0; const char *VAR_4 = NULL; switch (VAR_0) { case AVERROR_EOF:               VAR_4 = "End of file"; break; case AVERROR_INVALIDDATA:       VAR_4 = "Invalid data found when processing input"; break; case AVERROR_NUMEXPECTED:       VAR_4 = "Number syntax expected in filename"; break; case AVERROR_PATCHWELCOME:      VAR_4 = "Not yet implemented in FFmpeg, patches welcome"; break; } if (VAR_4) { av_strlcpy(VAR_1, VAR_4, VAR_2); } else { #if HAVE_STRERROR_R
VAR_3 = strerror_r(AVUNERROR(VAR_0), VAR_1, VAR_2); #endif
if (!HAVE_STRERROR_R || VAR_3 < 0)
snprintf(VAR_1, VAR_2, "Error number %d occurred", VAR_0); } return VAR_3; }