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

Side by Side Diff: media/filters/audio_file_reader.cc

Issue 311373004: Consolidate and improve audio decoding test for all decoders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. DEPS roll. Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/filters/audio_file_reader.h" 5 #include "media/filters/audio_file_reader.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Skip packets from other streams. 250 // Skip packets from other streams.
251 if (output_packet->stream_index != stream_index_) { 251 if (output_packet->stream_index != stream_index_) {
252 av_free_packet(output_packet); 252 av_free_packet(output_packet);
253 continue; 253 continue;
254 } 254 }
255 return true; 255 return true;
256 } 256 }
257 return false; 257 return false;
258 } 258 }
259 259
260 bool AudioFileReader::SeekForTesting(base::TimeDelta seek_time) {
261 return av_seek_frame(glue_->format_context(),
262 stream_index_,
263 ConvertToTimeBase(codec_context_->time_base, seek_time),
264 AVSEEK_FLAG_BACKWARD) >= 0;
265 }
266
260 } // namespace media 267 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698