Give Film a container; move crop into video content; other bits.
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index e99a960cef4723095ab6017b278f0c5a78a51e95..fcb2e82baabd84de4b0f6d53169a92831b920809 100644 (file)
@@ -68,7 +68,7 @@ boost::mutex FFmpegDecoder::_mutex;
 
 FFmpegDecoder::FFmpegDecoder (shared_ptr<const Film> f, shared_ptr<const FFmpegContent> c, bool video, bool audio, bool subtitles)
        : Decoder (f)
-       , VideoDecoder (f)
+       , VideoDecoder (f, c)
        , AudioDecoder (f, c)
        , _ffmpeg_content (c)
        , _format_context (0)
@@ -141,11 +141,13 @@ FFmpegDecoder::setup_general ()
                        }
                        
                        _audio_streams.push_back (
-                               FFmpegAudioStream (stream_name (s), i, s->codec->sample_rate, s->codec->channels)
+                               shared_ptr<FFmpegAudioStream> (
+                                       new FFmpegAudioStream (stream_name (s), i, s->codec->sample_rate, s->codec->channels)
+                                       )
                                );
-                       
+
                } else if (s->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
-                       _subtitle_streams.push_back (FFmpegSubtitleStream (stream_name (s), i));
+                       _subtitle_streams.push_back (shared_ptr<FFmpegSubtitleStream> (new FFmpegSubtitleStream (stream_name (s), i)));
                }
        }
 
@@ -538,7 +540,6 @@ void
 FFmpegDecoder::film_changed (Film::Property p)
 {
        switch (p) {
-       case Film::CROP:
        case Film::FILTERS:
        {
                boost::mutex::scoped_lock lm (_filter_graphs_mutex);