Autoscaling does not work with 4.0.0 if window handle was set
Posted: 10 Mar 2020 21:06
And calling libvlc_video_set_scale just interrupts the program without any messages. In version 3 everything works correctly. Help, please, what am I doing wrong?
OS: Windows 10
Compiler: MSVC 2017
vout: direct3d11
Code: Select all
int main(int argc, char *argv[])
{
libvlc_instance_t* inst = libvlc_new(0, NULL);
libvlc_media_t* m = libvlc_media_new_path(inst, "1.mp4");
libvlc_media_player_t* mp = libvlc_media_player_new_from_media(m);
libvlc_media_release(m);
libvlc_media_player_set_hwnd(mp, GetDesktopWindow()); // Desktop for example
// libvlc_media_player_set_hwnd(mp, reinterpret_cast<unsigned __int64*>(ui.videoWidget->winId())); // Tried Qt widget
libvlc_media_player_play(mp);
Sleep(1000);
libvlc_video_set_scale(mp, 2.0); // crash
Sleep(10000);
return 0;
}
Compiler: MSVC 2017
vout: direct3d11