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

Issue 113598: Use av_rescale_q() for converting FFmpeg timestamps to base::TimeDelta. (Closed)

Created:
11 years, 7 months ago by scherkus (not reviewing)
Modified:
9 years, 7 months ago
Reviewers:
awong
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Use av_rescale_q() for converting FFmpeg timestamps to base::TimeDelta. Previously we were using integer math to convert to microseconds, but depending on the frame rate and packet size we could introduce enough error that could accumulate and introduce audio/video synchronization drift. av_rescale_q() is a simple function but is designed to minimize error as much as possible.

Patch Set 1 #

Total comments: 3

Patch Set 2 : git try #

Total comments: 1

Patch Set 3 : Tweaksd #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -18 lines) Patch
M media/base/media_posix.cc View 1 3 chunks +10 lines, -1 line 0 comments Download
M media/filters/ffmpeg_audio_decoder.h View 1 chunk +4 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 2 chunks +27 lines, -3 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 2 chunks +5 lines, -5 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 4 chunks +11 lines, -9 lines 0 comments Download
M third_party/ffmpeg/avutil-50.def View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
scherkus (not reviewing)
You said you were interested ;) There's still some debug code in ffmpeg_audio_decoder.cc that will ...
11 years, 7 months ago (2009-05-19 21:54:48 UTC) #1
awong
http://codereview.chromium.org/113598/diff/1/3 File media/filters/ffmpeg_audio_decoder.cc (right): http://codereview.chromium.org/113598/diff/1/3#newcode99 Line 99: wsprintf(str, L"Fixing duration: %d\n", (int)duration.InMilliseconds()); why not %lld? ...
11 years, 7 months ago (2009-05-19 22:12:29 UTC) #2
scherkus (not reviewing)
Fixed up floating point math and removed debug code.
11 years, 7 months ago (2009-05-19 23:19:18 UTC) #3
awong
lgtm one nitpick about super long expression readability. http://codereview.chromium.org/113598/diff/1002/1004 File media/filters/ffmpeg_audio_decoder.cc (right): http://codereview.chromium.org/113598/diff/1002/1004#newcode115 Line 115: ...
11 years, 7 months ago (2009-05-19 23:30:49 UTC) #4
scherkus (not reviewing)
ok take one more peek
11 years, 7 months ago (2009-05-19 23:41:29 UTC) #5
awong
11 years, 7 months ago (2009-05-19 23:48:00 UTC) #6
still lgtm. :)

Powered by Google App Engine
This is Rietveld 408576698