diff options
author | Lukasz Marek <lukasz.m.luki2@gmail.com> | 2014-11-07 09:05:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-08 02:14:02 +0100 |
commit | 2b14593148e0aef6f3ca76dcc3f9f2133a066b3d (patch) | |
tree | 6011a6ae39fe1fd30374b9837d2c0ac90f4d8167 /ffmpeg_opt.c | |
parent | 33301f001747d7a542073c634cc81da5eff051cf (diff) | |
download | ffmpeg-2b14593148e0aef6f3ca76dcc3f9f2133a066b3d.tar.gz |
ffmpeg_opt: free incorrect priv_data for feed stream
new_output_stream creates a codec context with arbitraty picked codec.
Later data is updated, but priv_data are left alone.
There is a bit chance there is a mismatch between codecs.
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 1757dccf24..454da98680 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -1649,6 +1649,10 @@ static int read_ffserver_streams(OptionsContext *o, AVFormatContext *s, const ch else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && !ost->stream_copy) choose_pixel_fmt(st, st->codec, codec, st->codec->pix_fmt); avcodec_copy_context(ost->enc_ctx, st->codec); + if (ost->enc_ctx->priv_data) { + av_opt_free(ost->enc_ctx->priv_data); + av_freep(&ost->enc_ctx->priv_data); + } } avformat_close_input(&ic); |