diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2025-06-26 01:42:36 +0200 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2025-07-11 17:49:57 +0200 |
commit | 2c7e117fe0bd65a18286e6abe6c66f1bb7f8722e (patch) | |
tree | 5fc4a96a4a61260f5a541f03ee9a08be285d2c7e /libavformat/tls_openssl.c | |
parent | 7c91ae94198fd3dce7b9bed9d67096f0e5b5f260 (diff) | |
download | ffmpeg-2c7e117fe0bd65a18286e6abe6c66f1bb7f8722e.tar.gz |
avformat/tls: move whip specific init out of generic tls code
Diffstat (limited to 'libavformat/tls_openssl.c')
-rw-r--r-- | libavformat/tls_openssl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index a0fa3285d5..c126c87af4 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -975,14 +975,16 @@ static int tls_write(URLContext *h, const uint8_t *buf, int size) static int tls_get_file_handle(URLContext *h) { - TLSContext *c = h->priv_data; - return ffurl_get_file_handle(c->tls_shared.tcp); + TLSContext *p = h->priv_data; + TLSShared *c = &p->tls_shared; + return ffurl_get_file_handle(c->is_dtls ? c->udp : c->tcp); } static int tls_get_short_seek(URLContext *h) { - TLSContext *s = h->priv_data; - return ffurl_get_short_seek(s->tls_shared.tcp); + TLSContext *p = h->priv_data; + TLSShared *c = &p->tls_shared; + return ffurl_get_short_seek(c->is_dtls ? c->udp : c->tcp); } static const AVOption options[] = { @@ -1024,6 +1026,8 @@ const URLProtocol ff_dtls_protocol = { .url_close = dtls_close, .url_read = tls_read, .url_write = tls_write, + .url_get_file_handle = tls_get_file_handle, + .url_get_short_seek = tls_get_short_seek, .priv_data_size = sizeof(TLSContext), .flags = URL_PROTOCOL_FLAG_NETWORK, .priv_data_class = &dtls_class, |