[FFmpeg-devel] Realmedia patch

Luca Abeni lucabe72
Mon Sep 1 21:12:07 CEST 2008

Hi Ronald,

Ronald S. Bultje wrote:
>>> +    if (!(rt->server_type == RTSP_SERVER_RDT && rt->need_subscription)) {
>> This change looks suspicious...
>> (same for the rtsp_read_pause() change)
> These two can (hopefully) be addressed in one...
> So, for Realmedia, you can subscribe to one of the N rules. The way
> ffplay does that is that it calls av_open_input_file() and
> av_find_stream_info(), then chooses one of the N streams (based on the
> -ast X parameter) and then it sets the AVDISCARD_* flag in all
> AVStreams and starts reading data.

Thanks for the explaination. As usual, I forgot about stream selection ;-)

> I modified rtsp_play() (and pause()) to not be sent while the
> Subscribe command hasn't been sent yet, that's the second half of this
> change. Ugly, I know, but it worked. :-]. I'm open for suggestions on
> how to better do this.

After thinking about this for one day, I arrived to the conclusion that
the cleanest solution here is a little bit too radical:
remove the rtsp_read_play() call from rtsp_read_header(), move the real
"subscribe" code to rtsp_read_play(), and add a mechanism to call
rtsp_read_play() from rtsp_read_packet() the first time it is called
(similarly to your patch).

I understand this is a drastic change in the existing code, so I'd say
to go for it only if the maintainer explicitly agrees (otherwise, I see
no alternatives to your approach).


More information about the ffmpeg-devel mailing list