diff mbox series

[FFmpeg-devel] avformat/libsrt: remove url_get_file_handle implementation

Message ID tencent_F13E7FFEAF5A396DC185B4306A1200D1690A@qq.com
State Accepted
Commit e4f499f8422708fc56f8851220b3ae78ecee76f8
Headers show
Series [FFmpeg-devel] avformat/libsrt: remove url_get_file_handle implementation | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Zhao Zhili Aug. 9, 2021, 7:19 a.m. UTC
SRTSOCKET is an abstraction designed by libsrt, it's not guaranteed
to be a real file descriptor. Even if it is, it should not be
operated directly outside of libsrt.
---
 libavformat/libsrt.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Marton Balint Sept. 18, 2021, 8:12 p.m. UTC | #1
On Mon, 9 Aug 2021, Zhao Zhili wrote:

> SRTSOCKET is an abstraction designed by libsrt, it's not guaranteed
> to be a real file descriptor. Even if it is, it should not be
> operated directly outside of libsrt.
> ---
> libavformat/libsrt.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
> index e5701625b8..9aeaa8eb40 100644
> --- a/libavformat/libsrt.c
> +++ b/libavformat/libsrt.c
> @@ -706,12 +706,6 @@ static int libsrt_close(URLContext *h)
>     return 0;
> }
>
> -static int libsrt_get_file_handle(URLContext *h)
> -{
> -    SRTContext *s = h->priv_data;
> -    return s->fd;
> -}
> -
> static const AVClass libsrt_class = {
>     .class_name = "libsrt",
>     .item_name  = av_default_item_name,
> @@ -725,7 +719,6 @@ const URLProtocol ff_libsrt_protocol = {
>     .url_read            = libsrt_read,
>     .url_write           = libsrt_write,
>     .url_close           = libsrt_close,
> -    .url_get_file_handle = libsrt_get_file_handle,
>     .priv_data_size      = sizeof(SRTContext),
>     .flags               = URL_PROTOCOL_FLAG_NETWORK,
>     .priv_data_class     = &libsrt_class,

Thanks, applied.

Regards,
Marton
diff mbox series

Patch

diff --git a/libavformat/libsrt.c b/libavformat/libsrt.c
index e5701625b8..9aeaa8eb40 100644
--- a/libavformat/libsrt.c
+++ b/libavformat/libsrt.c
@@ -706,12 +706,6 @@  static int libsrt_close(URLContext *h)
     return 0;
 }
 
-static int libsrt_get_file_handle(URLContext *h)
-{
-    SRTContext *s = h->priv_data;
-    return s->fd;
-}
-
 static const AVClass libsrt_class = {
     .class_name = "libsrt",
     .item_name  = av_default_item_name,
@@ -725,7 +719,6 @@  const URLProtocol ff_libsrt_protocol = {
     .url_read            = libsrt_read,
     .url_write           = libsrt_write,
     .url_close           = libsrt_close,
-    .url_get_file_handle = libsrt_get_file_handle,
     .priv_data_size      = sizeof(SRTContext),
     .flags               = URL_PROTOCOL_FLAG_NETWORK,
     .priv_data_class     = &libsrt_class,