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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 10879057: Revert changes from r152523 and split bitstream converter creation and enabling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 27b6aabb8d1eab8e795ab1cb3e7a285297965953..40af5a3b777904ce9d179dca9dfa5d7eb019ec19 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -115,18 +115,7 @@ void GpuVideoDecoder::Stop(const base::Closure& closure) {
void GpuVideoDecoder::Initialize(const scoped_refptr<DemuxerStream>& stream,
const PipelineStatusCB& orig_status_cb,
const StatisticsCB& statistics_cb) {
- const VideoDecoderConfig& config = stream->video_decoder_config();
if (!gvd_loop_proxy_) {
- // FFmpegDemuxer's destructor frees/clears the AVStream underpinnings of
- // FFmpegDemuxerStream without notifying the stream, creating a race between
- // initialization and teardown. As a HACK until this is fixed, enable
- // the bitstream converter before posting the Initialize() call to the video
- // decoder thread since we know the DemuxerStream is valid at this point.
- // See http://crbug.com/143460 for more detail.
- // TODO(fischman): drop this hack!
- if (config.IsValidConfig() && config.codec() == kCodecH264)
- stream->EnableBitstreamConverter();
-
gvd_loop_proxy_ = base::ResetAndReturn(&message_loop_factory_cb_).Run();
gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind(
&GpuVideoDecoder::Initialize,
@@ -146,6 +135,7 @@ void GpuVideoDecoder::Initialize(const scoped_refptr<DemuxerStream>& stream,
// TODO(scherkus): this check should go in Pipeline prior to creating
// decoder objects.
+ const VideoDecoderConfig& config = stream->video_decoder_config();
if (!config.IsValidConfig()) {
DLOG(ERROR) << "Invalid video stream - " << config.AsHumanReadableString();
status_cb.Run(PIPELINE_ERROR_DECODE);
@@ -159,6 +149,9 @@ void GpuVideoDecoder::Initialize(const scoped_refptr<DemuxerStream>& stream,
return;
}
+ if (config.codec() == kCodecH264)
+ stream->EnableBitstreamConverter();
+
demuxer_stream_ = stream;
statistics_cb_ = statistics_cb;
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698