Skip to content

Commit

Permalink
ffserver_config: Setup codecpar in add_codec()
Browse files Browse the repository at this point in the history
fixes segfault in the status page code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 472fee9)
  • Loading branch information
michaelni committed Feb 7, 2017
1 parent 1fd78b9 commit 29ef35a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ffserver_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ static void add_codec(FFServerStream *stream, AVCodecContext *av,
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;
}

Expand Down

0 comments on commit 29ef35a

Please sign in to comment.