X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fffmpeg_decoder.cc;h=69ed7ac125f961828a748ce68d2886e5849eea36;hp=df6b7416b35a2fc521846ed91ec490e6faaef45d;hb=5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f;hpb=4e83acad0c2a5c528709a175a80261b8147d3b49 diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index df6b7416b..69ed7ac12 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -50,6 +50,7 @@ extern "C" { } #include #include +#include #include #include #include @@ -71,6 +72,7 @@ using std::pair; using std::max; using std::map; using boost::shared_ptr; +using boost::make_shared; using boost::is_any_of; using boost::split; using dcp::Size; @@ -175,7 +177,7 @@ FFmpegDecoder::deinterleave_audio (shared_ptr stream) const */ int const total_samples = size / bytes_per_audio_sample (stream); int const frames = total_samples / stream->channels(); - shared_ptr audio (new AudioBuffers (stream->channels(), frames)); + shared_ptr audio = make_shared (stream->channels(), frames); switch (audio_sample_format (stream)) { case AV_SAMPLE_FMT_U8: @@ -452,7 +454,7 @@ FFmpegDecoder::decode_video_packet () if (i->second != AV_NOPTS_VALUE) { double const pts = i->second * av_q2d (_format_context->streams[_video_stream.get()]->time_base) + _pts_offset.seconds (); video->give ( - shared_ptr (new RawImageProxy (image)), + make_shared (image), llrint (pts * _ffmpeg_content->active_video_frame_rate ()) ); } else { @@ -532,7 +534,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP /* Note RGBA is expressed little-endian, so the first byte in the word is R, second G, third B, fourth A. */ - shared_ptr image (new Image (AV_PIX_FMT_RGBA, dcp::Size (rect->w, rect->h), true)); + shared_ptr image = make_shared (AV_PIX_FMT_RGBA, dcp::Size (rect->w, rect->h), true); #ifdef DCPOMATIC_HAVE_AVSUBTITLERECT_PICT /* Start of the first line in the subtitle */