[FFmpeg-cvslog] ffserver_config: Setup codecpar in add_codec()
Michael Niedermayer
git at videolan.org
Wed Feb 8 21:50:27 EET 2017
ffmpeg | branch: release/3.1 | Michael Niedermayer <michael at niedermayer.cc> | Tue Nov 29 18:48:40 2016 +0100| [e34cbd1d2b1dabda733cbc64a82532bf17a84e97] | 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>
(cherry picked from commit 472fee91bcf9b7bae81fd4c00bbe5151ca458a7c)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e34cbd1d2b1dabda733cbc64a82532bf17a84e97
---
ffserver_config.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ffserver_config.c b/ffserver_config.c
index 0ec93b5..e0fc687 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;
}
More information about the ffmpeg-cvslog
mailing list