]> git.sesse.net Git - ffmpeg/blobdiff - ffserver_config.c
avformat/hlsenc: deprecate hls_wrap option
[ffmpeg] / ffserver_config.c
index 99709b54c70c1182c11f09622fd90e90bd46c439..54135be989c90cdf6ddded0a12c4e29169d44d75 100644 (file)
@@ -150,6 +150,11 @@ void ffserver_parse_acl_row(FFServerStream *stream, FFServerStream* feed,
     }
 
     nacl = av_mallocz(sizeof(*nacl));
+    if (!nacl) {
+        fprintf(stderr, "Failed to allocate FFServerIPAddressACL\n");
+        goto bail;
+    }
+
     naclp = 0;
 
     acl.next = 0;
@@ -182,7 +187,7 @@ bail:
 static void add_codec(FFServerStream *stream, AVCodecContext *av,
                       FFServerConfig *config)
 {
-    AVStream *st;
+    LayeredAVStream *st;
     AVDictionary **opts, *recommended = NULL;
     char *enc_config;
 
@@ -313,13 +318,15 @@ static void add_codec(FFServerStream *stream, AVCodecContext *av,
     }
 
 done:
-    st = av_mallocz(sizeof(AVStream));
+    st = av_mallocz(sizeof(*st));
     if (!st)
         return;
     av_dict_get_string(recommended, &enc_config, '=', ',');
     av_dict_free(&recommended);
-    av_stream_set_recommended_encoder_configuration(st, enc_config);
+    st->recommended_encoder_configuration = enc_config;
     st->codec = av;
+    st->codecpar = avcodec_parameters_alloc();
+    avcodec_parameters_from_context(st->codecpar, av);
     stream->streams[stream->nb_streams++] = st;
 }
 
@@ -1046,6 +1053,7 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd,
                                        AV_OPT_FLAG_VIDEO_PARAM, config) < 0)
             goto nomem;
     } else if (!av_strcasecmp(cmd, "BitExact")) {
+        config->bitexact = 1;
         if (ffserver_save_avoption("flags", "+bitexact", AV_OPT_FLAG_VIDEO_PARAM, config) < 0)
             goto nomem;
     } else if (!av_strcasecmp(cmd, "DctFastint")) {