]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/jack_audio.c
lavf: remove AVFormatParameters from AVFormatContext.read_header signature
[ffmpeg] / libavdevice / jack_audio.c
index c59a22d113f46e4bc81df09a96e230ce7eefec16..9f1bb23c3b6a752252fd031d65d0f1d051d3e874 100644 (file)
@@ -29,7 +29,8 @@
 #include "libavutil/opt.h"
 #include "libavcodec/avcodec.h"
 #include "libavformat/avformat.h"
-#include "libavformat/timefilter.h"
+#include "libavformat/internal.h"
+#include "timefilter.h"
 
 /**
  * Size of the internal FIFO buffers as a number of audio packets
@@ -220,7 +221,7 @@ static void stop_jack(JackData *self)
     ff_timefilter_destroy(self->timefilter);
 }
 
-static int audio_read_header(AVFormatContext *context, AVFormatParameters *params)
+static int audio_read_header(AVFormatContext *context)
 {
     JackData *self = context->priv_data;
     AVStream *stream;
@@ -229,7 +230,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param
     if ((test = start_jack(context)))
         return test;
 
-    stream = av_new_stream(context, 0);
+    stream = avformat_new_stream(context, NULL);
     if (!stream) {
         stop_jack(self);
         return AVERROR(ENOMEM);
@@ -244,7 +245,7 @@ static int audio_read_header(AVFormatContext *context, AVFormatParameters *param
     stream->codec->sample_rate  = self->sample_rate;
     stream->codec->channels     = self->nports;
 
-    av_set_pts_info(stream, 64, 1, 1000000);  /* 64 bits pts in us */
+    avpriv_set_pts_info(stream, 64, 1, 1000000);  /* 64 bits pts in us */
     return 0;
 }
 
@@ -270,7 +271,7 @@ static int audio_read_packet(AVFormatContext *context, AVPacket *pkt)
         }
     }
 
-    /* Wait for a packet comming back from process_callback(), if one isn't available yet */
+    /* Wait for a packet coming back from process_callback(), if one isn't available yet */
     timeout.tv_sec = av_gettime() / 1000000 + 2;
     if (sem_timedwait(&self->packet_count, &timeout)) {
         if (errno == ETIMEDOUT) {
@@ -314,7 +315,7 @@ static int audio_read_close(AVFormatContext *context)
 
 #define OFFSET(x) offsetof(JackData, x)
 static const AVOption options[] = {
-    { "channels", "Number of audio channels.", OFFSET(nports), FF_OPT_TYPE_INT, { 2 }, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
+    { "channels", "Number of audio channels.", OFFSET(nports), AV_OPT_TYPE_INT, { 2 }, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
     { NULL },
 };