Commit 09aa8971 authored by Jean-Paul Saman's avatar Jean-Paul Saman

examples/decode_mpeg.c: i_report undefined if HAVE_SYS_SOCKET_H is not defined.

parent 88185c53
......@@ -702,6 +702,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
......@@ -711,7 +712,7 @@ int main(int i_argc, char* pa_argv[])
#endif
b_first = VLC_TRUE;
}
#endif
if (p_data[i] != 0x47) /* no sync skip this packet */
{
fprintf( stderr, "Missing TS sync word, skipping 188 bytes\n" );
......@@ -772,6 +773,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
......@@ -780,6 +782,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_indicator )
......@@ -801,9 +804,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 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment