ffmpeg-20150921/libavformat/internal.h
/**
 * Wrap errno on rename() error.
 *
 * @param oldpath source path
 * @param newpath destination path
 * @return        0 or AVERROR on failure
 */
Wrap errno on rename() error.
@param oldpath source path
@param newpath destination path
@return        0 or AVERROR on failure
Wrap errno on rename () error . @param oldpath source path @param newpath destination path @return 0 or AVERROR on failure
static inline int ff_rename(const char *oldpath, const char *newpath, void *logctx)
{
    int ret = 0;
    if (rename(oldpath, newpath) == -1) {
        ret = AVERROR(errno);
        if (logctx)
            av_log(logctx, AV_LOG_ERROR, "failed to rename file %s to %s\n", oldpath, newpath);
    }
    return ret;
}
static inline int ff_rename ( const char * oldpath , const char * newpath , void * logctx ) { int ret = 0 ; if ( rename ( oldpath , newpath ) == -1 ) { ret = AVERROR ( errno ) ; if ( logctx ) av_log ( logctx , AV_LOG_ERROR , " \n " , oldpath , newpath ) ; } return ret ; }
Wrap errno on rename() error.
Wrap errno on rename () error .