You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I built mlt-7.4.0 using mingw64 toolchain. When playing mp4 videos using command line tool melt, consumer_sdl2 is used, and the producer is avformat I guess. If I resized playing window, frame resized as well, but stopped refreshing afterwards, and audio played as normal as before.
I digged into source file consumer_sdl2.c, finding self->window_width is updated after resizing event, everything seems OK. I tried adding following line after window resized:
SDL_RenderSetViewport(self->sdl_renderer, NULL);
Nothing good happened.
It's frustrated me serveral days. Any advice to solve it?
The text was updated successfully, but these errors were encountered:
After serveral days of hard work, I got an acceptable solution, although not elegant.
I changed consumer_sdl2.c to create an opengl context in function setup_sdl_video(), rendering frame from video_thread(), which is called from main thread of melt.c instead of a standalone thread. If I create opengl context in one thread and render in another one, nothing will be rendered.
To get the function address of video_thread() from melt.c, I set it as a property when consumer starts.
My patch is messy. Hope you great guys make a more reasonable solution.
I built mlt-7.4.0 using mingw64 toolchain. When playing mp4 videos using command line tool melt, consumer_sdl2 is used, and the producer is avformat I guess. If I resized playing window, frame resized as well, but stopped refreshing afterwards, and audio played as normal as before.
I digged into source file consumer_sdl2.c, finding self->window_width is updated after resizing event, everything seems OK. I tried adding following line after window resized:
SDL_RenderSetViewport(self->sdl_renderer, NULL);
Nothing good happened.
It's frustrated me serveral days. Any advice to solve it?
The text was updated successfully, but these errors were encountered: