diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-10 22:50:43 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-10 22:50:43 +0000 |
commit | b168ddfb28b4d83213dcfd5974ba64d2dc964030 (patch) | |
tree | f7777868aab7a7a91176fa41a009f57b341936df | |
parent | 3796bbb448326d8a820a52af6df5bead97fcb6ba (diff) | |
download | chromium_src-b168ddfb28b4d83213dcfd5974ba64d2dc964030.zip chromium_src-b168ddfb28b4d83213dcfd5974ba64d2dc964030.tar.gz chromium_src-b168ddfb28b4d83213dcfd5974ba64d2dc964030.tar.bz2 |
Remove misc. dead stores in media/ code (found by clang static analyzer).
Review URL: http://codereview.chromium.org/10048004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131661 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | media/base/h264_bitstream_converter.cc | 4 | ||||
-rw-r--r-- | media/base/yuv_convert.cc | 7 | ||||
-rw-r--r-- | media/filters/ffmpeg_demuxer.cc | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/media/base/h264_bitstream_converter.cc b/media/base/h264_bitstream_converter.cc index bdf6363..4e154f2 100644 --- a/media/base/h264_bitstream_converter.cc +++ b/media/base/h264_bitstream_converter.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -142,7 +142,6 @@ uint32 H264BitstreamConverter::CalculateNeededOutputBufferSize( // Actual NAL unit size output_size += nal_unit_length; input += nal_unit_length; - first_nal_in_this_access_unit = false; // No need for trailing zero bits } return output_size; @@ -311,4 +310,3 @@ bool H264BitstreamConverter::ConvertNalUnitStreamToByteStream( } } // namespace media - diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc index d6d2c3c..3cb9885 100644 --- a/media/base/yuv_convert.cc +++ b/media/base/yuv_convert.cc @@ -177,7 +177,6 @@ void ScaleYUVToRGB32(const uint8* y_buf, } int source_dx = source_width * kFractionMax / width; - int source_dy = source_height * kFractionMax / height; if ((view_rotate == ROTATE_90) || (view_rotate == ROTATE_270)) { @@ -187,10 +186,8 @@ void ScaleYUVToRGB32(const uint8* y_buf, tmp = source_height; source_height = source_width; source_width = tmp; - int original_dx = source_dx; - int original_dy = source_dy; - source_dx = ((original_dy >> kFractionBits) * y_pitch) << kFractionBits; - source_dy = original_dx; + int source_dy = source_height * kFractionMax / height; + source_dx = ((source_dy >> kFractionBits) * y_pitch) << kFractionBits; if (view_rotate == ROTATE_90) { y_pitch = -1; uv_pitch = -1; diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index f147a5f..eb357e3 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -228,15 +228,15 @@ void FFmpegDemuxerStream::EnableBitstreamConverter() { // Currently we assume that converter is determined by codec_id; DCHECK(stream_); - const char* filter_name = NULL; if (stream_->codec->codec_id == CODEC_ID_H264) { - filter_name = "h264_mp4toannexb"; // Use Chromium bitstream converter in case of H.264 bitstream_converter_.reset( new FFmpegH264BitstreamConverter(stream_->codec)); CHECK(bitstream_converter_->Initialize()); return; } + + const char* filter_name = NULL; if (stream_->codec->codec_id == CODEC_ID_MPEG4) { filter_name = "mpeg4video_es"; } else if (stream_->codec->codec_id == CODEC_ID_WMV3) { |