[FFmpeg-cvslog] audio_frame_queue: Define af_queue_log_state before using it

Martin Storsjö git at videolan.org
Wed Aug 29 18:09:24 CEST 2012


ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Tue Aug 28 17:23:16 2012 +0300| [0b58c77ed18ae1c0b47e4f25e43550dfc48da0e1] | committer: Martin Storsjö

audio_frame_queue: Define af_queue_log_state before using it

This fixes building with DEBUG defined after the function was made
static and the prototype removed in d7f9786cbc.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b58c77ed18ae1c0b47e4f25e43550dfc48da0e1
---

 libavcodec/audio_frame_queue.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/libavcodec/audio_frame_queue.c b/libavcodec/audio_frame_queue.c
index 9b14386..80f3100 100644
--- a/libavcodec/audio_frame_queue.c
+++ b/libavcodec/audio_frame_queue.c
@@ -51,6 +51,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 +161,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 */



More information about the ffmpeg-cvslog mailing list