[FFmpeg-devel] [PATCH 2/4] libavformat/tcp: Added an option to reuse sockets
Nicolas George
george at nsup.org
Fri Nov 3 10:48:17 EET 2017
Le tridi 13 brumaire, an CCXXVI, Karthick J a écrit :
> +static TCPSocket *first_socket = NULL;
<snip>
> + avpriv_lock_avformat();
> + socket->next = first_socket;
> + first_socket = socket;
> + avpriv_unlock_avformat();
I strongly oppose this: we do not want new global state.
Also, I am very doubtful about the feature itself. It is public, and as
such should be usable for many uses, but I do not see it useful for
anything but patches 3 and 4. Furthermore, it is a break of abstraction,
sockets lose their simple and clear API, they are not really closed when
they are closed, etc.
If you are trying to implement keepalive HTTP for HLS, then most of the
code should be in http.c and hls*.c, not tcp.c.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171103/14c9609c/attachment.sig>
More information about the ffmpeg-devel
mailing list