]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/audio_frame_queue.c
xsubdec: Convert to the new bitstream reader
[ffmpeg] / libavcodec / audio_frame_queue.c
index 0a8b25c6e340f1ce70267579e7363cc7dff99da3..c4ca02b01f4d11e93ec6a58f3b579322f9062293 100644 (file)
@@ -29,8 +29,8 @@ av_cold void ff_af_queue_init(AVCodecContext *avctx, AudioFrameQueue *afq)
 {
     afq->avctx             = avctx;
     afq->next_pts          = AV_NOPTS_VALUE;
-    afq->remaining_delay   = avctx->delay;
-    afq->remaining_samples = avctx->delay;
+    afq->remaining_delay   = avctx->initial_padding;
+    afq->remaining_samples = avctx->initial_padding;
     afq->frame_queue       = NULL;
 }
 
@@ -56,12 +56,12 @@ void ff_af_queue_close(AudioFrameQueue *afq)
 static void af_queue_log_state(AudioFrameQueue *afq)
 {
     AudioFrame *f;
-    av_dlog(afq->avctx, "remaining delay   = %d\n", afq->remaining_delay);
-    av_dlog(afq->avctx, "remaining samples = %d\n", afq->remaining_samples);
-    av_dlog(afq->avctx, "frames:\n");
+    ff_dlog(afq->avctx, "remaining delay   = %d\n", afq->remaining_delay);
+    ff_dlog(afq->avctx, "remaining samples = %d\n", afq->remaining_samples);
+    ff_dlog(afq->avctx, "frames:\n");
     f = afq->frame_queue;
     while (f) {
-        av_dlog(afq->avctx, "  [ pts=%9"PRId64" duration=%d ]\n",
+        ff_dlog(afq->avctx, "  [ pts=%9"PRId64" duration=%d ]\n",
                 f->pts, f->duration);
         f = f->next;
     }
@@ -111,7 +111,7 @@ int ff_af_queue_add(AudioFrameQueue *afq, const AVFrame *f)
 }
 
 void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts,
-                        int *duration)
+                        int64_t *duration)
 {
     int64_t out_pts = AV_NOPTS_VALUE;
     int removed_samples = 0;