Commit 95fa1fe4 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '71bf6b41'

* commit '71bf6b41':
  libavdevice: use avpriv_open()

Conflicts:
	libavdevice/v4l2.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents eec9c7af 71bf6b41
......@@ -25,6 +25,7 @@
*/
#include "libavformat/internal.h"
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
......@@ -135,7 +136,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height,
act.sa_handler = catchsignal;
sigaction(SIGUSR1, &act, &old);
*tuner_fd = open("/dev/tuner0", O_RDONLY);
*tuner_fd = avpriv_open("/dev/tuner0", O_RDONLY);
if (*tuner_fd < 0)
av_log(NULL, AV_LOG_ERROR, "Warning. Tuner not opened, continuing: %s\n", strerror(errno));
......
......@@ -27,6 +27,7 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "avdevice.h"
......@@ -88,7 +89,7 @@ static int dv1394_read_header(AVFormatContext * context)
goto failed;
/* Open and initialize DV1394 device */
dv->fd = open(context->filename, O_RDONLY);
dv->fd = avpriv_open(context->filename, O_RDONLY);
if (dv->fd < 0) {
av_log(context, AV_LOG_ERROR, "Failed to open DV interface: %s\n", strerror(errno));
goto failed;
......
......@@ -34,6 +34,7 @@
#include <time.h>
#include <linux/fb.h>
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
......@@ -108,7 +109,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
if (avctx->flags & AVFMT_FLAG_NONBLOCK)
flags |= O_NONBLOCK;
if ((fbdev->fd = open(avctx->filename, flags)) == -1) {
if ((fbdev->fd = avpriv_open(avctx->filename, flags)) == -1) {
ret = AVERROR(errno);
av_log(avctx, AV_LOG_ERROR,
"Could not open framebuffer device '%s': %s\n",
......
......@@ -34,6 +34,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
......@@ -63,9 +64,9 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi
char *flip = getenv("AUDIO_FLIP_LEFT");
if (is_output)
audio_fd = open(audio_device, O_WRONLY);
audio_fd = avpriv_open(audio_device, O_WRONLY);
else
audio_fd = open(audio_device, O_RDONLY);
audio_fd = avpriv_open(audio_device, O_RDONLY);
if (audio_fd < 0) {
av_log(s1, AV_LOG_ERROR, "%s: %s\n", audio_device, strerror(errno));
return AVERROR(EIO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment