wineqtdecoder: Calculate AvgTimePerFrame for video tracks.
This commit is contained in:
parent
0a2085f502
commit
deff27e23e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue