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

Unified Diff: content/renderer/media/rtc_video_encoder.cc

Issue 23440015: Fix webrtc HW encode deadlock scenarios. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 3 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 | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_encoder.cc
diff --git a/content/renderer/media/rtc_video_encoder.cc b/content/renderer/media/rtc_video_encoder.cc
index 1a4efcdc4e8220c4b630dde9919d6f3832031c38..bc40f4508891a041da903ac22f9c3b7c0b098442 100644
--- a/content/renderer/media/rtc_video_encoder.cc
+++ b/content/renderer/media/rtc_video_encoder.cc
@@ -250,7 +250,6 @@ void RTCVideoEncoder::Impl::Destroy() {
void RTCVideoEncoder::Impl::NotifyInitializeDone() {
DVLOG(3) << "Impl::NotifyInitializeDone()";
DCHECK(thread_checker_.CalledOnValidThread());
- SignalAsyncWaiter(WEBRTC_VIDEO_CODEC_OK);
}
void RTCVideoEncoder::Impl::RequireBitstreamBuffers(
@@ -298,6 +297,7 @@ void RTCVideoEncoder::Impl::RequireBitstreamBuffers(
video_encoder_->UseOutputBitstreamBuffer(media::BitstreamBuffer(
i, output_buffers_[i]->handle(), output_buffers_[i]->mapped_size()));
}
+ SignalAsyncWaiter(WEBRTC_VIDEO_CODEC_OK);
}
void RTCVideoEncoder::Impl::BitstreamBufferReady(int32 bitstream_buffer_id,
@@ -614,10 +614,12 @@ void RTCVideoEncoder::ReturnEncodedImage(scoped_ptr<webrtc::EncodedImage> image,
return;
webrtc::CodecSpecificInfo info;
+ memset(&info, 0, sizeof(info));
info.codecType = video_codec_type_;
// Generate a header describing a single fragment.
webrtc::RTPFragmentationHeader header;
+ memset(&header, 0, sizeof(header));
header.VerifyAndAllocateFragmentationHeader(1);
header.fragmentationOffset[0] = 0;
header.fragmentationLength[0] = image->_length;
« no previous file with comments | « content/renderer/media/renderer_gpu_video_accelerator_factories.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698