mirror of https://git.ffmpeg.org/ffmpeg.git
avplay: Don't free video filters string until the end of decoding.
av_freep()ing inside configure_video_filters() leaves a dangling reference in the calling code, and the filter string is needed again when reconfiguring video filters for a size change.
This commit is contained in:
parent
ebbede2265
commit
e1ce756844
2
avplay.c
2
avplay.c
|
@ -1731,7 +1731,6 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
|
||||||
|
|
||||||
if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, NULL)) < 0)
|
if ((ret = avfilter_graph_parse(graph, vfilters, inputs, outputs, NULL)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
av_freep(&vfilters);
|
|
||||||
} else {
|
} else {
|
||||||
if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0)
|
if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -1831,6 +1830,7 @@ static int video_thread(void *arg)
|
||||||
}
|
}
|
||||||
the_end:
|
the_end:
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
|
av_freep(&vfilters);
|
||||||
avfilter_graph_free(&graph);
|
avfilter_graph_free(&graph);
|
||||||
#endif
|
#endif
|
||||||
av_free(frame);
|
av_free(frame);
|
||||||
|
|
Loading…
Reference in New Issue