1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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.
This commit is contained in:
Anton Khirnov 2011-06-06 13:14:05 +02:00
parent 9bcbb250e2
commit dbaba52ed2

View File

@ -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++) {