X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fffmpeg.cc;fp=src%2Flib%2Fffmpeg.cc;h=316b9614de6f27bb18b26278e2fd21006e65d95f;hp=7ecc811be879a5af330402829377c7697a7204c2;hb=308488324dbc4d8b709d3fb1dc9fee0479346c21;hpb=362ed9ee4f73bee21b3ef8d3b449bb8e8877f501 diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index 7ecc811be..316b9614d 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -22,7 +22,7 @@ extern "C" { #include #include } -#include +#include #include "ffmpeg.h" #include "ffmpeg_content.h" #include "exceptions.h" @@ -34,7 +34,7 @@ using std::string; using std::cout; using std::stringstream; using boost::shared_ptr; -using libdcp::raw_convert; +using dcp::raw_convert; boost::mutex FFmpeg::_mutex; @@ -193,6 +193,10 @@ FFmpeg::video_codec_context () const AVCodecContext * FFmpeg::audio_codec_context () const { + if (!_ffmpeg_content->audio_stream ()) { + return 0; + } + return _ffmpeg_content->audio_stream()->stream(_format_context)->codec; }