]> git.sesse.net Git - ffmpeg/blobdiff - ffplay.c
vp9: profile 1 header decoding.
[ffmpeg] / ffplay.c
index adeae505f3c47ac2385fcfe0b532ea6aaafee682..b042ba7a94a895b22bd6b039ce7664d46137314d 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -1531,7 +1531,7 @@ static void step_to_next_frame(VideoState *is)
 
 static double compute_target_delay(double delay, VideoState *is)
 {
-    double sync_threshold, diff;
+    double sync_threshold, diff = 0;
 
     /* update delay to follow master synchronisation source */
     if (get_master_sync_type(is) != AV_SYNC_VIDEO_MASTER) {
@@ -2231,13 +2231,19 @@ static int video_thread(void *arg)
     enum AVPixelFormat last_format = -2;
     int last_serial = -1;
     int last_vfilter_idx = 0;
-    if (!graph)
+    if (!graph) {
+        av_frame_free(&frame);
         return AVERROR(ENOMEM);
+    }
 
 #endif
 
-    if (!frame)
+    if (!frame) {
+#if CONFIG_AVFILTER
+        avfilter_graph_free(&graph);
+#endif
         return AVERROR(ENOMEM);
+    }
 
     for (;;) {
         ret = get_video_frame(is, frame);