summaryrefslogtreecommitdiffstats
path: root/media/tools
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/tools
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/tools')
-rw-r--r--media/tools/seek_tester/seek_tester.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/tools/seek_tester/seek_tester.cc b/media/tools/seek_tester/seek_tester.cc
index 901c1bd..f8e769d 100644
--- a/media/tools/seek_tester/seek_tester.cc
+++ b/media/tools/seek_tester/seek_tester.cc
@@ -41,7 +41,7 @@ void QuitMessageLoop(MessageLoop* loop, media::PipelineStatus status) {
void TimestampExtractor(uint64* timestamp_ms,
MessageLoop* loop,
- const scoped_refptr<media::Buffer>& buffer) {
+ const scoped_refptr<media::DecoderBuffer>& buffer) {
if (buffer->GetTimestamp() == media::kNoTimestamp())
*timestamp_ms = -1;
else