[FFmpeg-cvslog] ffserver_config: Setup codecpar in add_codec()

Michael Niedermayer git at videolan.org
Tue Nov 29 20:27:32 EET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Nov 29 18:48:40 2016 +0100| [472fee91bcf9b7bae81fd4c00bbe5151ca458a7c] | committer: Michael Niedermayer

ffserver_config: Setup codecpar in add_codec()

fixes segfault in the status page code

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=472fee91bcf9b7bae81fd4c00bbe5151ca458a7c
---

 ffserver_config.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ffserver_config.c b/ffserver_config.c
index 14c58ce..2354cc7 100644
--- a/ffserver_config.c
+++ b/ffserver_config.c
@@ -320,6 +320,8 @@ done:
     av_dict_free(&recommended);
     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;
 }
 



More information about the ffmpeg-cvslog mailing list