This might happen if there was an error before priv_data was allocated and result in segfault.
Unified · Split
| @@ -2551,7 +2551,7 @@ void avformat_free_context(AVFormatContext *s) · 2550 unmodified lines | |||
| 2551 | AVStream *st; | 2551 | AVStream *st; |
| 2552 | 2552 | ||
| 2553 | av_opt_free(s); | 2553 | av_opt_free(s); |
| 2554 | if (s->iformat && s->iformat->priv_class) | 2554 | if (s->iformat && s->iformat->priv_class && s->priv_data) |
| 2555 | av_opt_free(s->priv_data); | 2555 | av_opt_free(s->priv_data); |
| 2556 | 2556 | ||
| 2557 | for(i=0;i<s->nb_streams;i++) { | 2557 | for(i=0;i<s->nb_streams;i++) { |