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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 14256013: Make more VideoDecoders reinitializable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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/gpu_video_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 3e111cdd6986813d451f17d8d79070becdcf5dbf..52b5cc93d2800fb5159446d62182e4512ec79987 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -76,13 +76,11 @@ void VpxVideoDecoder::Initialize(
const PipelineStatusCB& status_cb,
const StatisticsCB& statistics_cb) {
DCHECK(message_loop_->BelongsToCurrentThread());
- DCHECK(!demuxer_stream_) << "Already initialized.";
- weak_this_ = weak_factory_.GetWeakPtr();
+ DCHECK(stream);
+ DCHECK(read_cb_.is_null());
+ DCHECK(reset_cb_.is_null());
- if (!stream) {
- status_cb.Run(PIPELINE_ERROR_DECODE);
- return;
- }
+ weak_this_ = weak_factory_.GetWeakPtr();
demuxer_stream_ = stream;
statistics_cb_ = statistics_cb;
@@ -121,11 +119,7 @@ static vpx_codec_ctx* InitializeVpxContext(vpx_codec_ctx* context,
bool VpxVideoDecoder::ConfigureDecoder() {
const VideoDecoderConfig& config = demuxer_stream_->video_decoder_config();
- if (!config.IsValidConfig()) {
- DLOG(ERROR) << "Invalid video stream config: "
- << config.AsHumanReadableString();
- return false;
- }
+ DCHECK(config.IsValidConfig());
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
bool can_handle = false;
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698