[MPlayer-dev-eng] Sockets not closed while playing consecutive sdp files
Nico Sabbi
nsabbi at tiscali.it
Wed Nov 24 08:49:19 CET 2004
Selwyn Tang wrote:
> Hi all,
>
> The playback of two consecutive rtp streams through sdp files seems
> broken. I tested it with a simple playlist with two sdp files on it,
> and running mplayer in slave mode. After the command 'pt_step 1', the
> playback was broken, with the data of the two streams mixed together,
> showing broken macroblocks.
>
> The problem seems to be due to the unclosed sockets for receiving the
> previous stream. The /proc entry shows 2 more open sockets for each
> playtree step. Thus, the data of the two streams are mixed and the two
> videos flash alternatively on the screen.
>
> Looking into the code, I found at the end of demux_open_rtp() in
> demux_rtp.cpp a switch to another demuxer struct upon detecting a
> multiplexed rtp stream. The switch seems to lose the original demuxer
> type, which is DEMUXER_TYPE_RTP, and causes the rtp session not
> properly uninitialized upon free_demuxer():
>
> // Hack: If audio and video are demuxed together on a single RTP
> stream,
> // then create a new "demuxer_t" structure to allow the higher-level
> // code to recognize this:
> if (demux_is_multiplexed_rtp_stream(demuxer)) {
> stream_t* s = new_ds_stream(demuxer->video);
> demuxer_t* od = demux_open(s, DEMUXER_TYPE_UNKNOWN,
> audio_id, video_id, dvdsub_id, NULL);
> demuxer = new_demuxers_demuxer(od, od, od);
> }
>
> I'm not sure if I have misunderstood the problem. Please advice.
>
> Selwyn
>
both demux_rtp.cpp and demux_demuxers.c have close() functions, so
it shouldn't be the case
More information about the MPlayer-dev-eng
mailing list