aboutsummaryrefslogtreecommitdiffstats
path: root/ffserver.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-06-22 06:45:05 +0000
committerMartin Storsjö <martin@martin.st>2010-06-22 06:45:05 +0000
commit5634f30c4a25c17c1de26703948efeafb733413d (patch)
tree56d14c1b6fc37a8e4ace4d48bc91092b5ffadd38 /ffserver.c
parent33e7febdbe4ee288139e2e4f3e6b6edf5b9cde7d (diff)
downloadffmpeg-5634f30c4a25c17c1de26703948efeafb733413d.tar.gz
ffserver: Use avcodec_copy_context instead of manually copying an AVCodecContext
Originally committed as revision 23692 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r--ffserver.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ffserver.c b/ffserver.c
index 31d0268d05..14141f7ab2 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2748,14 +2748,7 @@ static int http_receive_data(HTTPContext *c)
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);