mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 10:30:05 +01:00
avformat/tls_gnutls: add av_assert0() for tls_shared
Signed-off-by: Jack Lau <jacklau1222@qq.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
|||||||
#include "os_support.h"
|
#include "os_support.h"
|
||||||
#include "url.h"
|
#include "url.h"
|
||||||
#include "tls.h"
|
#include "tls.h"
|
||||||
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
#include "libavutil/thread.h"
|
#include "libavutil/thread.h"
|
||||||
|
|
||||||
@@ -156,6 +157,7 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op
|
|||||||
TLSShared *s = &c->tls_shared;
|
TLSShared *s = &c->tls_shared;
|
||||||
uint16_t gnutls_flags = 0;
|
uint16_t gnutls_flags = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
av_assert0(s);
|
||||||
|
|
||||||
ff_gnutls_init();
|
ff_gnutls_init();
|
||||||
|
|
||||||
@@ -261,6 +263,7 @@ static int dtls_open(URLContext *h, const char *uri, int flags, AVDictionary **o
|
|||||||
{
|
{
|
||||||
TLSContext *c = h->priv_data;
|
TLSContext *c = h->priv_data;
|
||||||
TLSShared *s = &c->tls_shared;
|
TLSShared *s = &c->tls_shared;
|
||||||
|
av_assert0(s);
|
||||||
s->is_dtls = 1;
|
s->is_dtls = 1;
|
||||||
return tls_open(h, uri, flags, options);
|
return tls_open(h, uri, flags, options);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user