]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hls.c
avformat: Constify the API wrt AV(In|Out)putFormat
[ffmpeg] / libavformat / hls.c
index 597bea7f25d5ca518eaa1626aceeab3af8b50498..83acbb0aa6ad08f511221d16534fa94a91bb0097 100644 (file)
@@ -842,6 +842,10 @@ static int parse_playlist(HLSContext *c, const char *url,
             ff_parse_key_value(ptr, (ff_parse_key_val_cb) handle_init_section_args,
                                &info);
             cur_init_section = new_init_section(pls, &info, url);
+            if (!cur_init_section) {
+                ret = AVERROR(ENOMEM);
+                goto fail;
+            }
             cur_init_section->key_type = key_type;
             if (has_iv) {
                 memcpy(cur_init_section->iv, iv, sizeof(iv));
@@ -1953,8 +1957,8 @@ static int hls_read_header(AVFormatContext *s)
     /* Open the demuxer for each playlist */
     for (i = 0; i < c->n_playlists; i++) {
         struct playlist *pls = c->playlists[i];
+        const AVInputFormat *in_fmt = NULL;
         char *url;
-        ff_const59 AVInputFormat *in_fmt = NULL;
 
         if (!(pls->ctx = avformat_alloc_context())) {
             ret = AVERROR(ENOMEM);