Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 6993042: ffmpeg chromium glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: once more new test_expectations.txt Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer_unittest.cc
===================================================================
--- media/filters/chunk_demuxer_unittest.cc (revision 91170)
+++ media/filters/chunk_demuxer_unittest.cc (working copy)
@@ -45,12 +45,12 @@
memset(&streams_, 0, sizeof(streams_));
memset(&codecs_, 0, sizeof(codecs_));
- codecs_[VIDEO].codec_type = CODEC_TYPE_VIDEO;
+ codecs_[VIDEO].codec_type = AVMEDIA_TYPE_VIDEO;
codecs_[VIDEO].codec_id = CODEC_ID_VP8;
codecs_[VIDEO].width = 320;
codecs_[VIDEO].height = 240;
- codecs_[AUDIO].codec_type = CODEC_TYPE_AUDIO;
+ codecs_[AUDIO].codec_type = AVMEDIA_TYPE_AUDIO;
codecs_[AUDIO].codec_id = CODEC_ID_VORBIS;
codecs_[AUDIO].channels = 2;
codecs_[AUDIO].sample_rate = 44100;
@@ -59,6 +59,11 @@
virtual ~ChunkDemuxerTest() {
if (demuxer_.get())
demuxer_->Shutdown();
+ if (format_context_.streams) {
+ delete[] format_context_.streams;
+ format_context_.streams = NULL;
+ format_context_.nb_streams = 0;
+ }
}
void ReadFile(const std::string& name, scoped_array<uint8>* buffer,
@@ -137,6 +142,7 @@
void SetupAVFormatContext(bool has_audio, bool has_video) {
int i = 0;
+ format_context_.streams = new AVStream *[MAX_CODECS_INDEX];
if (has_audio) {
format_context_.streams[i] = &streams_[i];
streams_[i].codec = &codecs_[AUDIO];
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698