valbok / QtAVPlayer

Free and open-source Qt Media Player library based on FFmpeg, for Linux, Windows, macOS, iOS and Android.
MIT License
282 stars 54 forks source link

Drag play window bug #452

Closed samychen closed 6 months ago

samychen commented 6 months ago

When drag and drop the window, duplicate frames will appear, appearing every time

samychen commented 6 months ago

The test video resolution is 1080P 59.94fps,Use QAVHWDevice_D3D11 display appearing every time,but cpu render do not appear this bug

valbok commented 6 months ago

Hi, thanks for contributing! What version of Qt is it?

valbok commented 6 months ago
valbok commented 6 months ago

Also as I remember, old Qt QML supports only NV12 format for rendering, means it requires 2 textures, otherwise the renderer will fallback to frame.map(), it will download data from GPU and convert to proper format.

valbok commented 6 months ago

Your idea looks correct https://github.com/valbok/QtAVPlayer/pull/453/files but remember in some version of ffmpeg, AV_PIX_FMT_NV12 is returned for AV_HWDEVICE_TYPE_D3D11VA, maybe it is true for only some files ?

valbok commented 6 months ago

Could you confirm that your files are ok now? after 453. Thanks