Commit deff27e2 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

wineqtdecoder: Calculate AvgTimePerFrame for video tracks.

parent 0a2085f5
...@@ -884,6 +884,10 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk) ...@@ -884,6 +884,10 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk)
int t; int t;
DWORD outputWidth, outputHeight, outputDepth; DWORD outputWidth, outputHeight, outputDepth;
Fixed trackWidth, trackHeight; Fixed trackWidth, trackHeight;
Media videoMedia;
long sampleCount;
TimeValue64 duration;
TimeScale timeScale;
ZeroMemory(&amt, sizeof(amt)); ZeroMemory(&amt, sizeof(amt));
amt.formattype = FORMAT_VideoInfo; amt.formattype = FORMAT_VideoInfo;
...@@ -952,6 +956,12 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk) ...@@ -952,6 +956,12 @@ static HRESULT QT_Process_Video_Track(QTSplitter* filter, Track trk)
return E_FAIL; 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.dir = PINDIR_OUTPUT;
piOutput.pFilter = &filter->filter.IBaseFilter_iface; piOutput.pFilter = &filter->filter.IBaseFilter_iface;
lstrcpyW(piOutput.achName,szwVideoOut); lstrcpyW(piOutput.achName,szwVideoOut);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment