]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/audio_frame_queue.c
configure: Don't pass MSVC compiler options -M[TD] to armasm
[ffmpeg] / libavcodec / audio_frame_queue.c
index 9b14386179a351ad0aff045a7e209d837f8680e0..0a8b25c6e340f1ce70267579e7363cc7dff99da3 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/attributes.h"
 #include "libavutil/common.h"
 #include "libavutil/mathematics.h"
 #include "internal.h"
 #include "audio_frame_queue.h"
 
-void ff_af_queue_init(AVCodecContext *avctx, AudioFrameQueue *afq)
+av_cold void ff_af_queue_init(AVCodecContext *avctx, AudioFrameQueue *afq)
 {
     afq->avctx             = avctx;
     afq->next_pts          = AV_NOPTS_VALUE;
@@ -51,6 +52,22 @@ void ff_af_queue_close(AudioFrameQueue *afq)
     memset(afq, 0, sizeof(*afq));
 }
 
+#ifdef DEBUG
+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");
+    f = afq->frame_queue;
+    while (f) {
+        av_dlog(afq->avctx, "  [ pts=%9"PRId64" duration=%d ]\n",
+                f->pts, f->duration);
+        f = f->next;
+    }
+}
+#endif /* DEBUG */
+
 int ff_af_queue_add(AudioFrameQueue *afq, const AVFrame *f)
 {
     AudioFrame *new_frame;
@@ -145,19 +162,3 @@ void ff_af_queue_remove(AudioFrameQueue *afq, int nb_samples, int64_t *pts,
     if (duration)
         *duration = ff_samples_to_time_base(afq->avctx, removed_samples);
 }
-
-#ifdef DEBUG
-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");
-    f = afq->frame_queue;
-    while (f) {
-        av_dlog(afq->avctx, "  [ pts=%9"PRId64" duration=%d ]\n",
-                f->pts, f->duration);
-        f = f->next;
-    }
-}
-#endif /* DEBUG */