[FFmpeg-cvslog] avplay: Don't free video filters string until the end of decoding.

Alex Converse git at videolan.org
Wed Apr 11 23:21:22 CEST 2012


ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Tue Apr 10 18:18:53 2012 -0700| [e1ce756844e684876318570dcebc74bc66c084f0] | committer: Alex Converse

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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e1ce756844e684876318570dcebc74bc66c084f0
---

 avplay.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/avplay.c b/avplay.c
index d1cf53d..488d0fc 100644
--- a/avplay.c
+++ b/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)
             return ret;
-        av_freep(&vfilters);
     } else {
         if ((ret = avfilter_link(filt_src, 0, filt_out, 0)) < 0)
             return ret;
@@ -1831,6 +1830,7 @@ static int video_thread(void *arg)
     }
  the_end:
 #if CONFIG_AVFILTER
+    av_freep(&vfilters);
     avfilter_graph_free(&graph);
 #endif
     av_free(frame);



More information about the ffmpeg-cvslog mailing list