Index: media/filters/decoder_selector.cc |
diff --git a/media/filters/decoder_selector.cc b/media/filters/decoder_selector.cc |
index 077aed0d80b0a8fa889ae4c1671934c9eb740b46..1c5dba6acbe8c182ae54be33dfc6293e002d369c 100644 |
--- a/media/filters/decoder_selector.cc |
+++ b/media/filters/decoder_selector.cc |
@@ -116,32 +116,16 @@ void DecoderSelector<StreamType>::Abort() { |
DVLOG(2) << __FUNCTION__; |
DCHECK(task_runner_->BelongsToCurrentThread()); |
- // This could happen when SelectDecoder() was not called or when |
- // |select_decoder_cb_| was already posted but not fired (e.g. in the |
- // message loop queue). |
- if (select_decoder_cb_.is_null()) |
- return; |
- |
- // We must be trying to initialize the |decoder_| or the |
+ // We could be trying to initialize the |decoder_| or the |
scherkus (not reviewing)
2014/07/17 02:23:05
nit: reflow comment?
xhwang
2014/07/17 05:00:58
Done.
|
// |decrypted_stream_|. Invalid all weak pointers so that all initialization |
// callbacks won't fire. |
weak_ptr_factory_.InvalidateWeakPtrs(); |
- if (decoder_) { |
- // |decrypted_stream_| is either NULL or already initialized. We don't |
- // need to Stop() |decrypted_stream_| in either case. |
- decoder_.reset(); |
- ReturnNullDecoder(); |
- return; |
- } |
+ decoder_.reset(); |
+ decrypted_stream_.reset(); |
- if (decrypted_stream_) { |
- decrypted_stream_->Stop(); |
+ if (!select_decoder_cb_.is_null()) |
ReturnNullDecoder(); |
- return; |
- } |
- |
- NOTREACHED(); |
} |
template <DemuxerStream::Type StreamType> |