From f42d6a10c8645a83220341ef9cfd22b36b3b49b5 Mon Sep 17 00:00:00 2001 From: "dalecurtis@google.com" Date: Thu, 31 May 2012 20:35:25 +0000 Subject: 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 --- media/tools/seek_tester/seek_tester.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'media/tools') 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& buffer) { + const scoped_refptr& buffer) { if (buffer->GetTimestamp() == media::kNoTimestamp()) *timestamp_ms = -1; else -- cgit v1.1