aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-11-29 18:48:40 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-08 20:32:01 +0100
commite34cbd1d2b1dabda733cbc64a82532bf17a84e97 (patch)
tree4ab219954f98db5f600be0746c8b1e8ec99e3d10
parent6c1a2e6bc3f0a23b629827f141a644fc646c667e (diff)
downloadffmpeg-e34cbd1d2b1dabda733cbc64a82532bf17a84e97.tar.gz
ffserver_config: Setup codecpar in add_codec()
fixes segfault in the status page code Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 472fee91bcf9b7bae81fd4c00bbe5151ca458a7c)
-rw-r--r--ffserver_config.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ffserver_config.c b/ffserver_config.c
index 0ec93b5fda..e0fc6876e0 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -323,6 +323,8 @@ done:
av_dict_free(&recommended);
av_stream_set_recommended_encoder_configuration(st, enc_config);
st->codec = av;
+ st->codecpar = avcodec_parameters_alloc();
+ avcodec_parameters_from_context(st->codecpar, av);
stream->streams[stream->nb_streams++] = st;
}