[FFmpeg-cvslog] ffserver: remove one avcodec_context_copy()

Michael Niedermayer git at videolan.org
Sat Dec 3 15:06:41 EET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Dec  3 00:52:57 2016 +0100| [6c15618b90e4872e119fb083d31b6fc7661b33bb] | committer: Michael Niedermayer

ffserver: remove one avcodec_context_copy()

Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun at googlemail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 ffserver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ffserver.c b/ffserver.c
index 19c3ced..3ff761f 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);



More information about the ffmpeg-cvslog mailing list