diff --git a/libavformat/rtp_h264.c b/libavformat/rtp_h264.c
index 0b8853072f721902cc447d55c2d53ccb2d3e4821..5aeb6f183fc839b67e9ded8404fa4b4a2e34e0a5 100644
--- a/libavformat/rtp_h264.c
+++ b/libavformat/rtp_h264.c
@@ -165,9 +165,7 @@ static int h264_handle_packet(RTPDemuxContext * s,
                               const uint8_t * buf,
                               int len)
 {
-#ifdef DEBUG
     h264_rtp_extra_data *data = s->dynamic_protocol_context;
-#endif
     uint8_t nal = buf[0];
     uint8_t type = (nal & 0x1f);
     int result= 0;