From 0ac7529817ffcf3c1d708cb8b778aabcd31cbded Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 14 Nov 2012 13:35:51 +0100 Subject: advtime: Disable DEBUG for video_decode --- src/Makefile | 2 +- src/video_decode.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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 @@ -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); -- cgit