DescriptionPipeline: Use WeakPtr for DemuxerHost Calls and Tasks.
There is a chance that the Demuxer calls host_->OnDemuxerError() right
before Stop() is called. The Pipeline always posts a ErrorChangedTask() for
OnDemuxerError() with base::Retained(this).
After the Demuxer fires the stop callback, the Pipeline could be destroyed
immediately. So If the media thread hasn't been destroyed we could end up with
running ErrorChangedTask() on null pipeline which causes a crash.
This CL uses a weak pointer for DemuxerHost calls so that no task will run
after the pipeline is destroyed.
BUG=397656, 399417, 365141
TEST=Updated unit tests to cover this case.
R=scherkus@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287687
Patch Set 1 #Patch Set 2 : Use weak_this_for_demuxer_ in Pipeline. #Patch Set 3 : Updated unit tests. #
Total comments: 2
Patch Set 4 : drop weak_this_for_demuxer_ #
Total comments: 1
Messages
Total messages: 13 (0 generated)
|