]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/bktr.c
x86: mlpdsp: avoid taking address of void
[ffmpeg] / libavdevice / bktr.c
index 1a8562c0167c6fe3ffbd7d2085839d038be8cd69..cf5197286c7ef3700372046539cc481d090e81f8 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "libavformat/avformat.h"
+#include "libavformat/internal.h"
 #include "libavutil/log.h"
 #include "libavutil/opt.h"
 #include "libavutil/parseutils.h"
@@ -101,7 +102,7 @@ static av_cold int bktr_init(const char *video_device, int width, int height,
     long ioctl_frequency;
     char *arg;
     int c;
-    struct sigaction act, old;
+    struct sigaction act = { 0 }, old;
 
     if (idev < 0 || idev > 4)
     {
@@ -130,7 +131,6 @@ static av_cold int bktr_init(const char *video_device, int width, int height,
             frequency = 0.0;
     }
 
-    memset(&act, 0, sizeof(act));
     sigemptyset(&act.sa_mask);
     act.sa_handler = catchsignal;
     sigaction(SIGUSR1, &act, &old);
@@ -242,7 +242,7 @@ static int grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
     return video_buf_size;
 }
 
-static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
+static int grab_read_header(AVFormatContext *s1)
 {
     VideoData *s = s1->priv_data;
     AVStream *st;
@@ -275,7 +275,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
         ret = AVERROR(ENOMEM);
         goto out;
     }
-    av_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */
+    avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in use */
 
     s->width = width;
     s->height = height;
@@ -283,7 +283,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
 
     st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->pix_fmt = PIX_FMT_YUV420P;
-    st->codec->codec_id = CODEC_ID_RAWVIDEO;
+    st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
     st->codec->width = width;
     st->codec->height = height;
     st->codec->time_base.den = framerate.num;
@@ -291,7 +291,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
 
 
     if (bktr_init(s1->filename, width, height, s->standard,
-            &(s->video_fd), &(s->tuner_fd), -1, 0.0) < 0) {
+                  &s->video_fd, &s->tuner_fd, -1, 0.0) < 0) {
         ret = AVERROR(EIO);
         goto out;
     }