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

Unified Diff: chromecast/media/cma/decoder/cast_audio_decoder_linux.cc

Issue 2557513002: [Chromecast] Add support for different playback rates to ALSA backend (Closed)
Patch Set: use CreateEmptyBuffer Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromecast/media/cma/backend/multizone_backend_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/media/cma/decoder/cast_audio_decoder_linux.cc
diff --git a/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc b/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc
index 8fc50ad6bd3f4fa60a888b1673cbcbe5705aeb4b..5e93bb5a3e676950a5d3cbd3a4ab4a9cda7b18e0 100644
--- a/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc
+++ b/chromecast/media/cma/decoder/cast_audio_decoder_linux.cc
@@ -85,7 +85,10 @@ class CastAudioDecoderImpl : public CastAudioDecoder {
if (data->decrypt_context() != nullptr) {
LOG(ERROR) << "Audio decoder doesn't support encrypted stream";
- decode_callback.Run(kDecodeError, data);
+ // Post the task to ensure that |decode_callback| is not called from
+ // within a call to Decode().
+ task_runner_->PostTask(FROM_HERE,
+ base::Bind(decode_callback, kDecodeError, data));
} else if (!initialized_ || decode_pending_) {
decode_queue_.push(std::make_pair(data, decode_callback));
} else {
« no previous file with comments | « chromecast/media/cma/backend/multizone_backend_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698