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

Side by Side Diff: media/cdm/ppapi/ffmpeg_cdm_video_decoder.cc

Issue 111153003: FFmpeg fixups for M33 roll. Now with more Opus! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS update. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc ('k') | media/ffmpeg/ffmpeg_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cdm/ppapi/ffmpeg_cdm_video_decoder.h" 5 #include "media/cdm/ppapi/ffmpeg_cdm_video_decoder.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "media/base/buffers.h" 9 #include "media/base/buffers.h"
10 #include "media/base/limits.h" 10 #include "media/base/limits.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 LOG(ERROR) << "Initialize(): avcodec_find_decoder failed."; 167 LOG(ERROR) << "Initialize(): avcodec_find_decoder failed.";
168 return false; 168 return false;
169 } 169 }
170 170
171 int status; 171 int status;
172 if ((status = avcodec_open2(codec_context_.get(), codec, NULL)) < 0) { 172 if ((status = avcodec_open2(codec_context_.get(), codec, NULL)) < 0) {
173 LOG(ERROR) << "Initialize(): avcodec_open2 failed: " << status; 173 LOG(ERROR) << "Initialize(): avcodec_open2 failed: " << status;
174 return false; 174 return false;
175 } 175 }
176 176
177 av_frame_.reset(avcodec_alloc_frame()); 177 av_frame_.reset(av_frame_alloc());
178 is_initialized_ = true; 178 is_initialized_ = true;
179 179
180 return true; 180 return true;
181 } 181 }
182 182
183 void FFmpegCdmVideoDecoder::Deinitialize() { 183 void FFmpegCdmVideoDecoder::Deinitialize() {
184 DVLOG(1) << "Deinitialize()"; 184 DVLOG(1) << "Deinitialize()";
185 ReleaseFFmpegResources(); 185 ReleaseFFmpegResources();
186 is_initialized_ = false; 186 is_initialized_ = false;
187 } 187 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 326 }
327 327
328 void FFmpegCdmVideoDecoder::ReleaseFFmpegResources() { 328 void FFmpegCdmVideoDecoder::ReleaseFFmpegResources() {
329 DVLOG(1) << "ReleaseFFmpegResources()"; 329 DVLOG(1) << "ReleaseFFmpegResources()";
330 330
331 codec_context_.reset(); 331 codec_context_.reset();
332 av_frame_.reset(); 332 av_frame_.reset();
333 } 333 }
334 334
335 } // namespace media 335 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/ppapi/ffmpeg_cdm_audio_decoder.cc ('k') | media/ffmpeg/ffmpeg_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698