FIXME comment.
[dcpomatic.git] / src / lib / util.cc
index 0e250bb0885bfecde170a8fa5dd97a3690c906fe..340b76b57bfaad0eb762ea98ba73a64497d351b8 100644 (file)
@@ -233,6 +233,8 @@ seconds (struct timeval t)
 void
 dvdomatic_setup ()
 {
+       avfilter_register_all ();
+       
        Format::setup_formats ();
        DCPContentType::setup_dcp_content_types ();
        Scaler::setup_scalers ();
@@ -247,7 +249,7 @@ dvdomatic_setup ()
  *  @return FFmpeg crop filter string.
  */
 string
-crop_string (Position start, Size size)
+crop_string (Position start, libdcp::Size size)
 {
        stringstream s;
        s << "crop=" << size.width << ":" << size.height << ":" << start.x << ":" << start.y;
@@ -455,7 +457,6 @@ dcp_audio_channels (int f)
        return f;
 }
 
-
 bool operator== (Crop const & a, Crop const & b)
 {
        return (a.left == b.left && a.right == b.right && a.top == b.top && a.bottom == b.bottom);
@@ -621,6 +622,9 @@ Socket::read_definite_and_consume (uint8_t* data, int size, int timeout)
 /** Read as much data as is available, up to some limit.
  *  @param data Where to put the data.
  *  @param size Maximum amount of data to read.
+ *
+ *  XXX This method assumes that there is always lots of data to read();
+ *  if there isn't, it will hang waiting for data that will never arrive.
  */
 void
 Socket::read_indefinite (uint8_t* data, int size, int timeout)
@@ -933,11 +937,7 @@ video_frames_to_audio_frames (SourceFrame v, float audio_sample_rate, float fram
 bool
 still_image_file (string f)
 {
-#if BOOST_FILESYSTEM_VERSION == 3
        string ext = boost::filesystem::path(f).extension().string();
-#else
-       string ext = boost::filesystem::path(f).extension();
-#endif
 
        transform (ext.begin(), ext.end(), ext.begin(), ::tolower);