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

Issue 564213002: Merge "Avoid FFmpeg destroying active resources during demuxer stop." (Closed)

Created:
6 years, 3 months ago by DaleCurtis
Modified:
6 years, 3 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Base URL:
http://chromium.googlesource.com/chromium/src.git@2125
Project:
chromium
Visibility:
Public.

Description

Merge "Avoid FFmpeg destroying active resources during demuxer stop." The root cause is a combination of BufferedDataSource::Stop() requiring a lock and BlockingURLProtocol::Read() returning control to FFmpeg which may destory resources in use by an ongoing BufferedDataSource::ReadCallback() call. The lock in BDS::Stop() shared by BDS::ReadCallback() prevents the stop signal from taking affect until after the read finishes, however calling BUP::Abort() will immediately returns control to FFmpeg which may destroy the resources in use by BDS::ReadCallback(). Sadly, given the racy nature and multi-class dependencies I've been unable to craft a unit test for this, but I've manually verified this fix works by arbitrarily delaying BDS::Stop() under an ASAN build. BUG=411318 TEST=none TBR=dalecurtis,scherkus Review URL: https://codereview.chromium.org/544843005 Cr-Commit-Position: refs/heads/master@{#293995} (cherry picked from commit 1973f0b6f7497b1887397de9bb36dbff4faf5e39) Committed: https://chromium.googlesource.com/chromium/src/+/fa897c995fa7c7a209c389f4521d8a875c056c5a

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
M media/filters/ffmpeg_demuxer.cc View 1 chunk +5 lines, -1 line 0 comments Download

Messages

Total messages: 3 (1 generated)
DaleCurtis
6 years, 3 months ago (2014-09-13 00:08:10 UTC) #2
DaleCurtis
6 years, 3 months ago (2014-09-13 00:23:00 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as fa897c9 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698