On Mon, 20 Feb 2017, Luca Barbato wrote:

On 20/02/2017 12:02, Martin Storsjö wrote:
On Mon, 20 Feb 2017, Luca Barbato wrote:

---
libavformat/rtsp.c | 80
++++++++++++++++++++++++++++++++----------------------
1 file changed, 48 insertions(+), 32 deletions(-)

I'm not a fan of this.

Previously, while a bit entangled, we have one single poll loop which
can react to messages both on the control channel and on the udp sockets
as soon as they happen. After this, we need to wait for the next udp
packet, or a timeout in that poll loop in the worst case!, before
actually reacting to messages on the control channel.

If I read the code correctly it gives priority to rtp and it might just
return data from the first socket if it happens that there is always
data available...

Yes, sure. If you want to, you could just flip that over and have the tcp socket first in the list of polled fds as well. Having several poll loops is worse IMO, I'd rather have one single blocking poll than multiple ones polling this and that all over the place.

In any case; this patch is not ok as is. Defer it until you're done to post the rest of it; then it might be easier to see if this tradeoff is ok to achieve something else.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to