summaryrefslogtreecommitdiffstats
path: root/media/base/buffers_unittest.cc
diff options
context:
space:
mode:
authordalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 20:35:25 +0000
committerdalecurtis@google.com <dalecurtis@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 20:35:25 +0000
commitf42d6a10c8645a83220341ef9cfd22b36b3b49b5 (patch)
treedb76016f0b892d43961d1ead916de9f79534fa62 /media/base/buffers_unittest.cc
parent665e4fbc3d7de70829f6db36a955f63f9c4d7f9f (diff)
downloadchromium_src-f42d6a10c8645a83220341ef9cfd22b36b3b49b5.zip
chromium_src-f42d6a10c8645a83220341ef9cfd22b36b3b49b5.tar.gz
chromium_src-f42d6a10c8645a83220341ef9cfd22b36b3b49b5.tar.bz2
Introducing DecoderBuffer and general Buffer cleanup.
FFmpeg expects data to be padded and aligned in a certain way. It's currently possible to do this incorrectly and introduce dangerous issues. I enforce padding and alignment by introducing a new Buffer called DecoderBuffer and forcing DemuxerStream::Read to only accept it for transfer into decoders. DecoderBuffer allocates all memory through av_malloc (which takes care of alignment) with the appropriate padding size (except for Android, which doesn't care about this). Along the way it was necessary to clean up a large smattering of code to replace usage of DataBuffer with DecoderBuffer. I've rolled in several cleanup actions as well: - Moved DecryptConfig from Buffer to DecoderBuffer. - Replaced AVPacketBuffer and av_dup_packet with a DecoderBuffer::CopyFrom. - Fixed a resultant issue with FFmpegBitStreamConverter after removing the av_dup_packet functionality. Removed some unsupported bitstream filters. - Reduce TestDataUtil::ReadTestDataFile() to a single method returning a DecoderBuffer so unit tests will always have safe buffers. - Replace new DataBuffer(0)/new DecoderBuffer(0) w/ DecoderBuffer::CreateEOSBuffer. - Remove extraneous IsEndOfStream check from FFmpegAudioDecoder. BUG=129843 TEST=media_unittests + valgrind, layout tests. Review URL: https://chromiumcodereview.appspot.com/10447035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/buffers_unittest.cc')
-rw-r--r--media/base/buffers_unittest.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/media/base/buffers_unittest.cc b/media/base/buffers_unittest.cc
index 6cf0e09..a96b40b 100644
--- a/media/base/buffers_unittest.cc
+++ b/media/base/buffers_unittest.cc
@@ -82,9 +82,4 @@ TEST(BufferTest, IsEndOfStream) {
EXPECT_FALSE(buffer->IsEndOfStream());
}
-TEST(BufferTest, GetDecryptConfig) {
- scoped_refptr<TestBuffer> buffer = new TestBuffer();
- EXPECT_FALSE(buffer->GetDecryptConfig());
-}
-
} // namespace media