Fix some cppcheck warnings.
authorCarl Hetherington <cth@carlh.net>
Sun, 30 Apr 2017 00:32:43 +0000 (01:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 30 Apr 2017 00:32:43 +0000 (01:32 +0100)
src/lib/content_video.h
src/lib/player.cc
src/lib/player.h
src/lib/scoped_temporary.cc
src/lib/writer.h

index ddc03b2655d78f4d1b6ab575c369eb0b96f4640b..f59e99cfc65cd25cbbe57552a17648841c06527c 100644 (file)
@@ -30,7 +30,9 @@ class ContentVideo
 {
 public:
        ContentVideo ()
-               : part (PART_WHOLE)
+               : frame (0)
+               , eyes (EYES_LEFT)
+               , part (PART_WHOLE)
        {}
 
        ContentVideo (boost::shared_ptr<const ImageProxy> i, Frame f, Eyes e, Part p)
index 72922d70a2b238b22ea7bfb6d27083affab1b970..7ede96a0daeee117dc09b7ea32b64c20c8dc1b37 100644 (file)
@@ -417,13 +417,6 @@ Player::set_ignore_video ()
        _ignore_video = true;
 }
 
-/** Set this player never to produce any audio data */
-void
-Player::set_ignore_audio ()
-{
-       _ignore_audio = true;
-}
-
 /** Set whether or not this player should always burn text subtitles into the image,
  *  regardless of the content settings.
  *  @param burn true to always burn subtitles, false to obey content settings.
index eb6589b564cce151cee832f0b2db929cc61411d3..719e4289595485ffa46153de92f7944194dcbdfe 100644 (file)
@@ -62,7 +62,6 @@ public:
 
        void set_video_container_size (dcp::Size);
        void set_ignore_video ();
-       void set_ignore_audio ();
        void set_enable_subtitles (bool enable);
        void set_always_burn_subtitles (bool burn);
        void set_fast ();
index 5c885e4df205d29a61afda65ccdfaa770ee267a2..4043caf3d28ee91c6224651fa9ca6e1103dc3191 100644 (file)
@@ -50,6 +50,7 @@ ScopedTemporary::c_str () const
 FILE*
 ScopedTemporary::open (char const * params)
 {
+       close ();
        _open = fopen (c_str(), params);
        return _open;
 }
index 2a78637e570c0a68d00d8303b85431b93f772cca..1e4d3b6a36f5646b78ca3f31b0755dacc87bf7cb 100644 (file)
@@ -47,6 +47,9 @@ struct QueueItem
 public:
        QueueItem ()
                : size (0)
+               , reel (0)
+               , frame (0)
+               , eyes (EYES_BOTH)
        {}
 
        enum Type {