| Index: media/ffmpeg/ffmpeg_util.cc
|
| diff --git a/media/ffmpeg/ffmpeg_util.cc b/media/ffmpeg/ffmpeg_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1be3b12446b33d29c31123399dc467a5c8eb7e25
|
| --- /dev/null
|
| +++ b/media/ffmpeg/ffmpeg_util.cc
|
| @@ -0,0 +1,18 @@
|
| +// Copyright (c) 2009 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.
|
| +
|
| +#include "media/ffmpeg/ffmpeg_util.h"
|
| +
|
| +#include "media/filters/ffmpeg_common.h"
|
| +
|
| +namespace media {
|
| +
|
| +static const AVRational kMicrosBase = { 1, base::Time::kMicrosecondsPerSecond };
|
| +
|
| +base::TimeDelta ConvertTimestamp(const AVRational& time_base, int64 timestamp) {
|
| + int64 microseconds = av_rescale_q(timestamp, time_base, kMicrosBase);
|
| + return base::TimeDelta::FromMicroseconds(microseconds);
|
| +}
|
| +
|
| +} // namespace media
|
|
|