Define AVERROR for ffmpeg 0.4.8 & 0.4.9-pre1 and add a missing motion_log()

This commit is contained in:
AngelCarpintero
2008-01-18 03:23:33 +00:00
parent 1e5918bb28
commit a109cdbe9f
2 changed files with 16 additions and 0 deletions

View File

@@ -4,8 +4,23 @@
#ifdef HAVE_FFMPEG
#include <errno.h>
#include <avformat.h>
#ifndef AVERROR /* 0.4.8 & 0.4.9-pre1 */
#if EINVAL > 0
#define AVERROR(e) (-(e))
#define AVUNERROR(e) (-(e))
#else
/* Some platforms have E* and errno already negated. */
#define AVERROR(e) (e)
#define AVUNERROR(e) (e)
#endif
#endif /* AVERROR */
#endif /* HAVE_FFMPEG */
#include <stdio.h>
#include <stdarg.h>

View File

@@ -177,6 +177,7 @@ unsigned char *v4l_start(struct context *cnt, struct video_dev *viddev, int widt
}
if (MAP_FAILED == map) {
motion_log(LOG_ERR,1,"MAP_FAILED");
return (NULL);
}
viddev->v4l_curbuffer=0;