Commit 6a1f7b51 authored by gunsch's avatar gunsch Committed by Commit bot

Removes MediaDecoderJob virtual method call from destructor.

This execution path is currently seen used when destroying a
VideoDecoderJob that's still decoding:
* MediaDecoderJob::Release (early return, destroy_pending_=true)
* ...
* MediaDecoderJob::OnDecodeComplete
* ~VideoDecoderJob
* ~MediaDecoderJob
* MediaDecoderJob::ReleaseMediaCodecBridge
* MediaDecoderJob::OnMediaCodecBridgeReleased <-- !!!

The last line should be:
* VideoDecoderJob::OnMediaCodecBridgeReleased

but since it is invoked during the destructor the overridden
implementation is not executed.

R=qinmin@chromium.org,xhwang@chromium.org
BUG=internal b/17671489

Review URL: https://codereview.chromium.org/647553003

Cr-Commit-Position: refs/heads/master@{#299159}
parent a27b85e6
......@@ -48,7 +48,7 @@ MediaDecoderJob::MediaDecoderJob(
}
MediaDecoderJob::~MediaDecoderJob() {
ReleaseMediaCodecBridge();
DCHECK(!media_codec_bridge_);
}
void MediaDecoderJob::OnDataReceived(const DemuxerData& data) {
......@@ -232,6 +232,7 @@ void MediaDecoderJob::Release() {
return;
}
ReleaseMediaCodecBridge();
delete this;
}
......@@ -500,6 +501,7 @@ void MediaDecoderJob::OnDecodeCompleted(
if (destroy_pending_) {
DVLOG(1) << __FUNCTION__ << " : completing pending deletion";
ReleaseMediaCodecBridge();
delete this;
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment