Only do long probes of FFmpeg content with the examiner, not the decoder.
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index 8da607e7eb62861812d035d88461f39fc83c1bcd..be32475377da2c851647bc4ea8f247218c9d24f5 100644 (file)
@@ -61,9 +61,9 @@ using libdcp::Size;
 FFmpegDecoder::FFmpegDecoder (shared_ptr<const Film> f, shared_ptr<const FFmpegContent> c, bool video, bool audio)
        : Decoder (f)
        , VideoDecoder (f, c)
-       , AudioDecoder (f)
+       , AudioDecoder (f, c)
        , SubtitleDecoder (f)
-       , FFmpeg (c)
+       , FFmpeg (c, false)
        , _subtitle_codec_context (0)
        , _subtitle_codec (0)
        , _decode_video (video)
@@ -339,6 +339,7 @@ FFmpegDecoder::seek (VideoContent::Frame frame, bool accurate)
                }
 
                if (_packet.stream_index != _video_stream) {
+                       av_free_packet (&_packet);
                        continue;
                }