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

Unified Diff: media/filters/ffmpeg_demuxer_unittest.cc

Issue 113619: Use av_rescale_q() for converting FFmpeg timestamps to base::TimeDelta (second attempt). (Closed)
Patch Set: Created 11 years, 7 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') | third_party/ffmpeg/avutil-50.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer_unittest.cc
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index a882c585cfd31327c59ec812d78d1f906d529b01..f4c989a288b27c59ec111b99a31ca8149e55be89 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -134,6 +134,12 @@ int av_find_stream_info(AVFormatContext* format) {
return g_av_find_stream_info;
}
+int64 av_rescale_q(int64 a, AVRational bq, AVRational cq) {
awong 2009/05/20 18:17:42 Hah...cute. We do need a way to better mock these
scherkus (not reviewing) 2009/05/20 18:21:27 You should see the actual implementation. It's an
+ int64 num = bq.num * cq.den;
+ int64 den = cq.num * bq.den;
+ return a * num / den;
+}
+
void av_free(void* ptr) {
if (ptr) {
EXPECT_EQ(&g_format, ptr);
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | third_party/ffmpeg/avutil-50.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698