Fix some uninitialised variables.
authorCarl Hetherington <cth@carlh.net>
Wed, 27 May 2015 09:21:46 +0000 (10:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 27 May 2015 09:21:46 +0000 (10:21 +0100)
src/lib/audio_content.h
src/lib/content_video.h
src/lib/ffmpeg_examiner.cc
src/lib/video_content.cc

index cb14c70cb4020058f8ec240e4d50a482158255dc..ee5a7db7ad10766dd8062fa64636688e87e921ad 100644 (file)
@@ -54,8 +54,6 @@ public:
 class AudioContent : public virtual Content
 {
 public:
-       typedef int64_t Frame;
-       
        AudioContent (boost::shared_ptr<const Film>);
        AudioContent (boost::shared_ptr<const Film>, DCPTime);
        AudioContent (boost::shared_ptr<const Film>, boost::filesystem::path);
index cdf0f9cddddb30ae7b70219b7fe5984ac977ed62..c8f5cca0b9c29b708b3ab5fb64e81b44845554dc 100644 (file)
@@ -31,6 +31,7 @@ public:
        ContentVideo ()
                : eyes (EYES_BOTH)
                , part (PART_WHOLE)
+               , frame (0)
        {}
 
        ContentVideo (boost::shared_ptr<const ImageProxy> i, Eyes e, Part p, Frame f)
index eea99e1e8afdfcf9998e56acf4c7f15a8d3c8d9a..5062ef0ca60957b16fd3efe0383067918a6a3254 100644 (file)
@@ -40,6 +40,7 @@ using boost::optional;
 /** @param job job that the examiner is operating in, or 0 */
 FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Job> job)
        : FFmpeg (c)
+       , _video_length (0)
        , _need_video_length (false)
 {
        /* Find audio and subtitle streams */
index 0397647ef78e853df1a7bc34d9b634c38cfccf58..a8355ffd67aa0b78ef6c97c5c59d324cbc5c2cc4 100644 (file)
@@ -66,6 +66,8 @@ VideoContent::VideoContent (shared_ptr<const Film> f)
        , _video_frame_rate (0)
        , _video_frame_type (VIDEO_FRAME_TYPE_2D)
        , _scale (VideoContentScale (Ratio::from_id ("178")))
+       , _fade_in (0)
+       , _fade_out (0)
 {
        set_default_colour_conversion ();
 }
@@ -76,6 +78,8 @@ VideoContent::VideoContent (shared_ptr<const Film> f, DCPTime s, Frame len)
        , _video_frame_rate (0)
        , _video_frame_type (VIDEO_FRAME_TYPE_2D)
        , _scale (VideoContentScale (Ratio::from_id ("178")))
+       , _fade_in (0)
+       , _fade_out (0)
 {
        set_default_colour_conversion ();
 }
@@ -86,6 +90,8 @@ VideoContent::VideoContent (shared_ptr<const Film> f, boost::filesystem::path p)
        , _video_frame_rate (0)
        , _video_frame_type (VIDEO_FRAME_TYPE_2D)
        , _scale (VideoContentScale (Ratio::from_id ("178")))
+       , _fade_in (0)
+       , _fade_out (0)
 {
        set_default_colour_conversion ();
 }
@@ -120,6 +126,8 @@ VideoContent::VideoContent (shared_ptr<const Film> f, cxml::ConstNodePtr node, i
        if (version >= 32) {
                _fade_in = node->number_child<Frame> ("FadeIn");
                _fade_out = node->number_child<Frame> ("FadeOut");
+       } else {
+               _fade_in = _fade_out = 0;
        }
 }