summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-14 13:35:51 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-11-14 13:38:13 +0100
commit0ac7529817ffcf3c1d708cb8b778aabcd31cbded (patch)
treefd87be5799efdb753665bae720c1332012a346d4
parentdec6515881e54b95666d52ffaa1a0eac414d21e7 (diff)
downloadadvtime-0ac7529817ffcf3c1d708cb8b778aabcd31cbded.tar.gz
advtime-0ac7529817ffcf3c1d708cb8b778aabcd31cbded.tar.bz2
advtime-0ac7529817ffcf3c1d708cb8b778aabcd31cbded.zip
advtime: Disable DEBUG for video_decode
-rw-r--r--src/Makefile2
-rw-r--r--src/video_decode.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile
index b5a6901..43087cb 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -4,7 +4,7 @@ LIBAV_DECODE_FLAGS=`pkg-config --libs --cflags libavformat libavcodec libavutil
all: advtime decode_frame frame_to_pgm
advtime: advtime.c video_decode.c
- gcc $(CFLAGS) $(LIBAV_DECODE_FLAGS) advtime.c video_decode.c -o $@
+ gcc $(CFLAGS) $(LIBAV_DECODE_FLAGS) -DDEBUG=0 advtime.c video_decode.c -o $@
decode_frame: decode_frame.c
gcc $(CFLAGS) $(LIBAV_DECODE_FLAGS) decode_frame.c -o $@
diff --git a/src/video_decode.c b/src/video_decode.c
index 1d17afe..4a2eaf4 100644
--- a/src/video_decode.c
+++ b/src/video_decode.c
@@ -1,4 +1,7 @@
+#ifndef DEBUG
#define DEBUG 1
+#endif
+
#include "video_decode.h"
#include <libavutil/avutil.h>
@@ -106,7 +109,9 @@ video_decode_get_frame(struct video_decode *vd, struct video_frame **frame)
if (packet.data != NULL)
av_free_packet(&packet);
if (av_read_frame(vd->fmt_ctx, &packet) < 0) {
+#if DEBUG
fprintf(stderr, "Found no video stream packet!\n");
+#endif
return -1;
}
} while (packet.stream_index != vd->stream);