Browse code

ffplay: only free vfilters on exit

Freeing it in the end of the video thread is not a good idea, because we still
may need the filter names for the next video thread, in order to apply the
filters after chaning the video stream.

Signed-off-by: Marton Balint <cus@passwd.hu>

Marton Balint authored on 2012/08/30 06:56:33
Showing 1 changed files
... ...
@@ -938,6 +938,7 @@ static void do_exit(VideoState *is)
938 938
     uninit_opts();
939 939
 #if CONFIG_AVFILTER
940 940
     avfilter_uninit();
941
+    av_freep(&vfilters);
941 942
 #endif
942 943
     avformat_network_deinit();
943 944
     if (show_status)
... ...
@@ -1790,7 +1791,6 @@ static int video_thread(void *arg)
1790 1790
  the_end:
1791 1791
     avcodec_flush_buffers(is->video_st->codec);
1792 1792
 #if CONFIG_AVFILTER
1793
-    av_freep(&vfilters);
1794 1793
     avfilter_graph_free(&graph);
1795 1794
 #endif
1796 1795
     av_free_packet(&pkt);