[FFmpeg-devel] [PATCH 2/3] avformat/hlsenc: Handle NULL input in IO open and close utility functions
Karthick J
kjeyapal at akamai.com
Thu Nov 30 11:05:59 EET 2017
From: Karthick Jeyapal <kjeyapal at akamai.com>
---
libavformat/hlsenc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 9048cb2..ff982c5 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -244,7 +244,7 @@ static int is_http_proto(char *filename) {
static int hlsenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename,
AVDictionary **options) {
HLSContext *hls = s->priv_data;
- int http_base_proto = is_http_proto(filename);
+ int http_base_proto = filename ? is_http_proto(filename) : 0;
int err;
if (!*pb || !http_base_proto || !hls->http_persistent) {
err = s->io_open(s, pb, filename, AVIO_FLAG_WRITE, options);
@@ -258,7 +258,7 @@ static int hlsenc_io_open(AVFormatContext *s, AVIOContext **pb, char *filename,
static void hlsenc_io_close(AVFormatContext *s, AVIOContext **pb, char *filename) {
HLSContext *hls = s->priv_data;
- int http_base_proto = is_http_proto(filename);
+ int http_base_proto = filename ? is_http_proto(filename) : 0;
if (!http_base_proto || !hls->http_persistent || hls->key_info_file || hls->encrypt) {
ff_format_io_close(s, pb);
--
1.9.1
More information about the ffmpeg-devel
mailing list