diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-23 19:57:58 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-23 19:57:58 +0000 |
commit | cb51aef1ab82ea5d424646c83527daa88c6a0fb7 (patch) | |
tree | c58c0a246a6e07c54784ac80d22f5691fba20607 /ffserver.c | |
parent | a33a6eb2ceeda1dddb0a63f516365b09d44f5dcf (diff) | |
download | ffmpeg-cb51aef1ab82ea5d424646c83527daa88c6a0fb7.tar.gz |
copy extradata if present
Originally committed as revision 13913 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/ffserver.c b/ffserver.c index ad001402d3..d17f997412 100644 --- a/ffserver.c +++ b/ffserver.c @@ -2497,9 +2497,18 @@ static int http_receive_data(HTTPContext *c) goto fail; } - for (i = 0; i < s->nb_streams; i++) - memcpy(feed->streams[i]->codec, - s->streams[i]->codec, sizeof(AVCodecContext)); + 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); + } + } av_close_input_stream(s); av_free(pb); |