[MPlayer-cvslog] r33242 - in trunk: mplayer.c udp_sync.c
Ivan Kalvachev
ikalvachev at gmail.com
Fri Apr 15 12:06:47 CEST 2011
On 4/9/11, reimar <subversion at mplayerhq.hu> wrote:
> Author: reimar
> Date: Sat Apr 9 16:55:22 2011
> New Revision: 33242
>
> Log:
> Send udp master updates also when paused and let slave use normal timing
> when it gets no messages.
> This allows the slave to continue playing normally if the master crashes
> or network stops working instead of hanging forever.
> Note that the slave might still hang for the 30 second network timeout
> in some cases.
>
> Modified:
> trunk/mplayer.c
> trunk/udp_sync.c
>
> Modified: trunk/mplayer.c
> ==============================================================================
> --- trunk/mplayer.c Sat Apr 9 16:47:16 2011 (r33241)
> +++ trunk/mplayer.c Sat Apr 9 16:55:22 2011 (r33242)
> @@ -2170,6 +2170,17 @@ static int fill_audio_out_buffers(void)
> return 1;
> }
>
> +static void handle_udp_master(double time)
> +{
> +#ifdef CONFIG_NETWORKING
> + if (udp_master) {
> + char current_time[256];
> + snprintf(current_time, sizeof(current_time), "%f", time);
> + send_udp(udp_ip, udp_port, current_time);
> + }
> +#endif /* CONFIG_NETWORKING */
> +}
> +
> static int sleep_until_update(float *time_frame, float *aq_sleep_time)
> {
> int frame_time_remaining = 0;
> @@ -2235,13 +2246,7 @@ static int sleep_until_update(float *tim
> if (*time_frame > 0.001 && !(vo_flags&256))
> *time_frame = timing_sleep(*time_frame);
>
> -#ifdef CONFIG_NETWORKING
> - if (udp_master) {
> - char current_time[256];
> - snprintf(current_time, sizeof(current_time), "%f",
> mpctx->sh_video->pts);
> - send_udp(udp_ip, udp_port, current_time);
> - }
> -#endif /* CONFIG_NETWORKING */
> + handle_udp_master(mpctx->sh_video->pts);
>
> return frame_time_remaining;
> }
> @@ -2534,6 +2539,7 @@ static void pause_loop(void)
> }
> }
> #endif
> + handle_udp_master(mpctx->sh_video->pts);
This dereferrences NULL pointer in audio-only playback is paused.
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1904
More information about the MPlayer-cvslog
mailing list