Reasonably straightforward stuff; main things are adding
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 698078b5b4339eae552aa67d249d24d24bd82d9d..5240decb24dfd69e74650b31a2de3b13ab8c8f18 100644 (file)
@@ -72,12 +72,12 @@ using boost::split;
 using dcp::Size;
 
 FFmpegDecoder::FFmpegDecoder (shared_ptr<const FFmpegContent> c, shared_ptr<Log> log, bool fast)
-       : VideoDecoder (c)
+       : VideoDecoder (c->video, log)
        , AudioDecoder (c, fast)
        , SubtitleDecoder (c)
        , FFmpeg (c)
        , _log (log)
-       , _pts_offset (pts_offset (c->ffmpeg_audio_streams(), c->first_video(), c->video_frame_rate()))
+       , _pts_offset (pts_offset (c->ffmpeg_audio_streams(), c->first_video(), c->video->video_frame_rate()))
 {
 
 }
@@ -414,7 +414,7 @@ FFmpegDecoder::decode_video_packet ()
                        double const pts = i->second * av_q2d (_format_context->streams[_video_stream]->time_base) + _pts_offset.seconds ();
                        video (
                                shared_ptr<ImageProxy> (new RawImageProxy (image)),
-                               llrint (pts * _ffmpeg_content->video_frame_rate ())
+                               llrint (pts * _ffmpeg_content->video->video_frame_rate ())
                                );
                } else {
                        LOG_WARNING_NC ("Dropping frame without PTS");
@@ -548,7 +548,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
                out_p += image->stride()[0] / sizeof (uint32_t);
        }
 
-       dcp::Size const vs = _ffmpeg_content->video_size ();
+       dcp::Size const vs = _ffmpeg_content->video->video_size ();
        dcpomatic::Rect<double> const scaled_rect (
                static_cast<double> (rect->x) / vs.width,
                static_cast<double> (rect->y) / vs.height,