提交 5634f30c 编写于 作者: M Martin Storsjö

ffserver: Use avcodec_copy_context instead of manually copying an AVCodecContext

Originally committed as revision 23692 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 33e7febd
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册