Better fix for still (no sound) DCP crash.
[dcpomatic.git] / src / lib / encoder.cc
index cff9899acb6151cc19990f372c0a091c7d63968f..8549962ff01807505683266e778d16c4c8eaef43 100644 (file)
@@ -296,6 +296,10 @@ Encoder::process_video (shared_ptr<const Image> image, bool same, boost::shared_
 void
 Encoder::process_audio (shared_ptr<const AudioBuffers> data)
 {
+       if (!data->frames ()) {
+               return;
+       }
+       
 #if HAVE_SWRESAMPLE
        /* Maybe sample-rate convert */
        if (_swr_context) {