Merge master.
[dcpomatic.git] / src / lib / ffmpeg.cc
index 7ecc811be879a5af330402829377c7697a7204c2..316b9614de6f27bb18b26278e2fd21006e65d95f 100644 (file)
@@ -22,7 +22,7 @@ extern "C" {
 #include <libavformat/avformat.h>
 #include <libswscale/swscale.h>
 }
-#include <libdcp/raw_convert.h>
+#include <dcp/raw_convert.h>
 #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;
 }