Message ID | 20191129055632.30294-1-lq@chinaffmpeg.org |
---|---|
State | New |
Headers | show |
Steven Liu: > Signed-off-by: Steven Liu <lq@chinaffmpeg.org> > --- > libavformat/utils.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/utils.c b/libavformat/utils.c > index 8196442dd1..0461aa83ec 100644 > --- a/libavformat/utils.c > +++ b/libavformat/utils.c > @@ -4469,6 +4469,7 @@ void avformat_free_context(AVFormatContext *s) > av_freep(&s->internal); > av_freep(&s->url); > av_free(s); > + s = NULL; > } > > void avformat_close_input(AVFormatContext **ps) > Absolutely pointless as I have just explained in another mail: This resets the function's copy of s, a local variable whose lifetime ends with this function anyway. - Andreas
diff --git a/libavformat/utils.c b/libavformat/utils.c index 8196442dd1..0461aa83ec 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4469,6 +4469,7 @@ void avformat_free_context(AVFormatContext *s) av_freep(&s->internal); av_freep(&s->url); av_free(s); + s = NULL; } void avformat_close_input(AVFormatContext **ps)
Signed-off-by: Steven Liu <lq@chinaffmpeg.org> --- libavformat/utils.c | 1 + 1 file changed, 1 insertion(+)