[FFmpeg-devel] [PATCH 4/5] ffserver: remove one avcodec_context_copy()
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Sat Dec 3 13:49:28 EET 2016
On 03.12.2016 00:52, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> ffserver.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ffserver.c b/ffserver.c
> index 19c3ceda1a..3ff761f68f 100644
> --- a/ffserver.c
> +++ b/ffserver.c
> @@ -2854,7 +2854,8 @@ static int http_receive_data(HTTPContext *c)
> for (i = 0; i < s->nb_streams; i++) {
> LayeredAVStream *fst = feed->streams[i];
> AVStream *st = s->streams[i];
> - avcodec_copy_context(fst->codec, st->codec);
> + avcodec_parameters_to_context(fst->codec, st->codecpar);
> + avcodec_parameters_from_context(fst->codecpar, fst->codec);
> }
>
> avformat_close_input(&s);
>
This is probably OK.
Best regards,
Andreas
More information about the ffmpeg-devel
mailing list