]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/jack_audio.c
eamad: pass & check errors
[ffmpeg] / libavdevice / jack_audio.c
index 9a6b4865bd0a7500f8b306211c89ad1147982bae..d0a09ee2185cc1fa1f2e89aafca81bb59e889b25 100644 (file)
@@ -28,7 +28,9 @@
 #include "libavutil/fifo.h"
 #include "libavutil/opt.h"
 #include "libavcodec/avcodec.h"
-#include "libavformat/timefilter.h"
+#include "libavformat/avformat.h"
+#include "libavformat/internal.h"
+#include "timefilter.h"
 #include "avdevice.h"
 
 /**
@@ -229,7 +231,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 +246,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 +272,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 +316,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 },
 };