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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 126306: Refactor FFmpegDemuxerTest to use gmock and eliminate flakiness. (Closed)
Patch Set: Added SCOPED_TRACE Created 11 years, 6 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 | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 2e04b62e8e755ea2f833d004cf81b8a66f03cbcc..d4c7fc55dc604e30630ea2bcf78c297acb312f12 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -171,7 +171,8 @@ FFmpegDemuxer::FFmpegDemuxer()
}
FFmpegDemuxer::~FFmpegDemuxer() {
- Stop();
+ DCHECK(!thread_.IsRunning());
+ DCHECK(!format_context_.get());
// TODO(scherkus): I believe we need to use av_close_input_file() here
// instead of scoped_ptr_malloc calling av_free().
//
@@ -186,6 +187,7 @@ void FFmpegDemuxer::PostDemuxTask() {
void FFmpegDemuxer::Stop() {
thread_.Stop();
+ format_context_.reset();
}
void FFmpegDemuxer::Seek(base::TimeDelta time) {
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698