wineqtdecoder: Calculate AvgTimePerFrame for video tracks.

This commit is contained in:
Aric Stewart 2013-07-15 13:04:42 -05:00 committed by Alexandre Julliard
parent 0a2085f502
commit deff27e23e
1 changed files with 10 additions and 0 deletions

View File

@ -884,6 +884,10 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk)
int t;
DWORD outputWidth, outputHeight, outputDepth;
Fixed trackWidth, trackHeight;
Media videoMedia;
long sampleCount;
TimeValue64 duration;
TimeScale timeScale;
ZeroMemory(&amt, sizeof(amt));
amt.formattype = FORMAT_VideoInfo;
@ -952,6 +956,12 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk)
return E_FAIL;
}
videoMedia = GetTrackMedia(trk);
sampleCount = GetMediaSampleCount(videoMedia);
timeScale = GetMediaTimeScale(videoMedia);
duration = GetMediaDisplayDuration(videoMedia);
pvi->AvgTimePerFrame = (100000.0 * sampleCount * timeScale) / duration;
piOutput.dir = PINDIR_OUTPUT;
piOutput.pFilter = &filter->filter.IBaseFilter_iface;
lstrcpyW(piOutput.achName,szwVideoOut);