[FFmpeg-devel] [PATCH] Support RTP/TCP in the RTSP muxer
Martin Storsjö
martin
Mon Mar 15 17:17:06 CET 2010
On Mon, 15 Mar 2010, Ronald S. Bultje wrote:
> On Mon, Mar 15, 2010 at 11:50 AM, Martin Storsj? <martin at martin.st> wrote:
> [..]
>
> if (return_on_interleaved_data) {
> return 1;
> } else
> - rtsp_skip_packet(s);
> + ff_rtsp_skip_packet(s);
> } else if (ch != '\r') {
> if ((q - buf) < sizeof(buf) - 1)
> *q++ = ch;
>
> Can you fix the indenting in a separate patch? I must've forgotten.
Done.
> Patch #1 is OK otherwise.
Good, will apply when/if #2 is ok.
> Patch #2 seems pointless, why would you want to skip packets there
> instead of in read_reply()?
If we skip the packets within read_reply, the function won't return until
it has actually received a RTSP reply. If there's only a interleaved
packet waiting on the socket, select will indicate that there's data to be
read, read_reply will skip that but block until it receives a RTSP reply,
which isn't coming anytime soon.
So by doing it this way, we first notice that there's data to be read,
receive/skip the whole interleaved packet, and then recheck with select if
there's anything left to read, exiting the loop if there's nothing more to
process.
// Martin
More information about the ffmpeg-devel
mailing list