[Libav-user] blit swscale to texture
Alex Cohn
alexcohn at netvision.net.il
Mon Mar 19 14:09:24 CET 2012
On Mon, Mar 19, 2012 at 11:14, David martin <vilanew at gmail.com> wrote:
> Hi,
> I'm cross posting to both SDl and ffmpeg list as this might be linked to
> both groups.
> This is a code snippet works to display a video image using SDL2.0 and
> ffmpeg. This code could probably be improved and one way would be to
> directly blit into the texture.
> Do you know which SDL2.0 function should i use do blit the swscale object
> into a texture without going through the two steps in the code below ?
You could create a texture with SDL_PIXELFORMAT_YV12 and set the
pixels without sws_scale(). You don't need to create and destroy the
texture for each frame: you can reuse same texture object for the
whole movie.
BR,
Alex
More information about the Libav-user
mailing list