diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-11-29 18:48:40 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-07 13:21:14 +0100 |
commit | 29ef35abffa00dd3975ab96314f1aafabc140f88 (patch) | |
tree | 45d4376c925f92eb74c27c31e6671cf2dfc7e2cc | |
parent | 1fd78b9b34b8ada1ed06769f8ceabb9ca4193ccd (diff) | |
download | ffmpeg-29ef35abffa00dd3975ab96314f1aafabc140f88.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.c | 2 |
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; } |