提交 dbaba52e 编写于 作者: A Anton Khirnov

lavf: don't try to free private options if priv_data is NULL.

This might happen if there was an error before priv_data was allocated
and result in segfault.
上级 9bcbb250
......@@ -2551,7 +2551,7 @@ void avformat_free_context(AVFormatContext *s)
AVStream *st;
av_opt_free(s);
if (s->iformat && s->iformat->priv_class)
if (s->iformat && s->iformat->priv_class && s->priv_data)
av_opt_free(s->priv_data);
for(i=0;i<s->nb_streams;i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册