]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/jack_audio.c
eamad: pass & check errors
[ffmpeg] / libavdevice / jack_audio.c
index ac84786b7aa6f10e46ef431a1dc8a0d54a8a075f..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) {