[FFmpeg-cvslog] r23692 - trunk/ffserver.c

mstorsjo subversion
Tue Jun 22 08:45:05 CEST 2010


Author: mstorsjo
Date: Tue Jun 22 08:45:05 2010
New Revision: 23692

Log:
ffserver: Use avcodec_copy_context instead of manually copying an AVCodecContext

Modified:
   trunk/ffserver.c

Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c	Tue Jun 22 00:54:53 2010	(r23691)
+++ trunk/ffserver.c	Tue Jun 22 08:45:05 2010	(r23692)
@@ -2748,14 +2748,7 @@ static int http_receive_data(HTTPContext
             for (i = 0; i < s->nb_streams; i++) {
                 AVStream *fst = feed->streams[i];
                 AVStream *st = s->streams[i];
-                memcpy(fst->codec, st->codec, sizeof(AVCodecContext));
-                if (fst->codec->extradata_size) {
-                    fst->codec->extradata = av_malloc(fst->codec->extradata_size);
-                    if (!fst->codec->extradata)
-                        goto fail;
-                    memcpy(fst->codec->extradata, st->codec->extradata,
-                           fst->codec->extradata_size);
-                }
+                avcodec_copy_context(fst->codec, st->codec);
             }
 
             av_close_input_stream(s);



More information about the ffmpeg-cvslog mailing list