Remove libavformat-specific bit from FileGroup.
authorCarl Hetherington <cth@carlh.net>
Sat, 23 Nov 2013 12:34:36 +0000 (12:34 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 23 Nov 2013 12:34:36 +0000 (12:34 +0000)
src/lib/file_group.cc
src/lib/wscript
test/file_group_test.cc

index 5f9531f4cceef1c3503f8ac7851e155acf6c611d..d364a395d6a6d2f5ad986e2e7c9ffcaf81fcd9e4 100644 (file)
@@ -18,9 +18,6 @@
 */
 
 #include <cstdio>
-extern "C" {
-#include <libavformat/avio.h>
-}
 #include <sndfile.h>
 #include "file_group.h"
 #include "exceptions.h"
@@ -96,8 +93,6 @@ FileGroup::seek (int64_t pos, int whence) const
        case SEEK_END:
                full_pos = len - pos;
                break;
-       case AVSEEK_SIZE:
-               return len;
        }
 
        /* Seek to full_pos */
index 1e88e6e62cca1997c227728a13cd741835905f23..ebd316a0c174b88420d05b95fb64aeb432532587 100644 (file)
@@ -22,6 +22,7 @@ sources = """
           encoder.cc
           examine_content_job.cc
           exceptions.cc
+          file_group.cc
           filter_graph.cc
           ffmpeg.cc
           ffmpeg_content.cc
index 025d6be02d49a9c02d67f5a82dff579381d705ac..6f66d88042fec3d48bd7166b77ffdcf4a45035f2 100644 (file)
@@ -21,9 +21,6 @@
 #include <cstdio>
 #include <boost/test/unit_test.hpp>
 #include <boost/filesystem.hpp>
-extern "C" {
-#include <libavformat/avio.h>
-}
 #include "lib/file_group.h"
 
 using std::vector;
@@ -107,7 +104,4 @@ BOOST_AUTO_TEST_CASE (file_group_test)
        BOOST_CHECK_EQUAL (fg.seek (1077, SEEK_END), total_length - 1077);
        BOOST_CHECK_EQUAL (fg.read (test, 256), 256);
        BOOST_CHECK_EQUAL (memcmp (data + total_length - 1077, test, 256), 0);
-
-       /* AVSEEK_SIZE */
-       BOOST_CHECK_EQUAL (fg.seek (-1, AVSEEK_SIZE), total_length);
 }