From 0a40ad27c7a3cbcb92d841f3beebe3d11fcaea2c Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Wed, 24 Aug 2011 15:29:40 +0200 Subject: [PATCH] example/decode_mpeg.c: i_report is undeclared if HAVE_SYS_SOCKET_H is undefined. --- examples/decode_mpeg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/decode_mpeg.c b/examples/decode_mpeg.c index ca56190..adf1319 100644 --- a/examples/decode_mpeg.c +++ b/examples/decode_mpeg.c @@ -652,6 +652,7 @@ int main(int i_argc, char* pa_argv[]) vlc_bool_t b_adaptation = (p_tmp[3] & 0x20); /* adaptation field */ vlc_bool_t b_discontinuity_seen = VLC_FALSE; +#ifdef HAVE_SYS_SOCKET_H if( i_report == REPORT_UDP && !b_first ) { #ifdef HAVE_GETTIMEOFDAY @@ -661,7 +662,7 @@ int main(int i_argc, char* pa_argv[]) #endif b_first = VLC_TRUE; } - +#endif if( i_pid == 0x0 ) dvbpsi_PushPacket(p_stream->pat.handle, p_tmp); else if( p_stream->pmt.pid_pmt && i_pid == p_stream->pmt.pid_pmt->i_pid ) @@ -713,6 +714,7 @@ int main(int i_argc, char* pa_argv[]) i_prev_pcr = p_stream->pid[i_pid].i_pcr; p_stream->pid[i_pid].i_pcr = i_pcr; +#ifdef HAVE_SYS_SOCKET_H if( i_report == REPORT_PCR ) { #ifdef HAVE_GETTIMEOFDAY @@ -721,6 +723,7 @@ int main(int i_argc, char* pa_argv[]) report_PCRPacketTiming( i_cc, &(p_stream->pid[i_pid]), i_prev_pcr, i_bytes ); #endif } +#endif i_bytes = 0; /* reset byte counter */ if( b_discontinuity_seen ) @@ -742,9 +745,10 @@ int main(int i_argc, char* pa_argv[]) } } +#ifdef HAVE_SYS_SOCKET_H if( i_report == REPORT_UDP ) i_bytes = 0; /* reset byte counter */ - +#endif /* Read next packet */ if( filename ) i_len = ReadPacket( i_fd, p_data ); -- GitLab