[FFmpeg-cvslog] muxer opts: fix avdict use in case of early private context alloc
Michael Niedermayer
git at videolan.org
Mon Jul 25 22:40:01 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul 25 22:25:24 2011 +0200| [2962049ac318c1577c15e934a50b64572b2e877c] | committer: Michael Niedermayer
muxer opts: fix avdict use in case of early private context alloc
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2962049ac318c1577c15e934a50b64572b2e877c
---
libavformat/utils.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 44ecd0a..38407b9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2929,6 +2929,9 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
av_dict_copy(&tmp, *options, 0);
if ((ret = av_opt_set_dict(s, &tmp)) < 0)
goto fail;
+ if (s->priv_data && s->oformat->priv_class && *(const AVClass**)s->priv_data==s->oformat->priv_class &&
+ (ret = av_opt_set_dict(s->priv_data, &tmp)) < 0)
+ goto fail;
// some sanity checks
if (s->nb_streams == 0 && !(s->oformat->flags & AVFMT_NOSTREAMS)) {
More information about the ffmpeg-cvslog
mailing list