[MPlayer-dev-eng] Sockets not closed while playing consecutive sdp files
Selwyn Tang
selwyn at hectrix.com
Wed Nov 24 07:39:30 CET 2004
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
More information about the MPlayer-dev-eng
mailing list