Ok thanks i will give it a try.
Should i update the texture through the SDL_updatetexture function or just through a pointer to the texture ?


On 03/19/2012 02:09 PM, Alex Cohn wrote:
On Mon, Mar 19, 2012 at 11:14, David martin<[email protected]>  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


_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to