Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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) { | |
|
wolenetz
2014/06/06 21:00:05
How ingrained is embedding alternate timebase time
DaleCurtis
2014/06/06 21:17:00
See my comment about skipping timebase conversion
| |
| 261 return av_seek_frame(glue_->format_context(), | |
| 262 stream_index_, | |
| 263 seek_time.InMicroseconds(), | |
| 264 AVSEEK_FLAG_BACKWARD) >= 0; | |
| 265 } | |
| 266 | |
| 260 } // namespace media | 267 } // namespace media |
| OLD | NEW |