{
// Event Handling.
// Copy texter1 to renderer,
// present the renderer.
}
I tried creating texture1 so that it is created only once. But that
doesn’t work.
My question is why do we need each time to create texture each time , is
it is right way ?. or am i doing something wrong ?
Kindly help me.
Hi,
you don’t have to recreate a texture each time, if the size you
need stays constant. Look into SDL_UpdateTexture [1] on how
to push new pixels into an existing texture.
NOw i get the below error, Texture dimensions can’t be 0 while creating texture, is it something related to avcodec_decode_video2 ? which might be updating the texture dimension ?
Sorry to type wrongly. avcodec_decode_video2 is no way related to
texture, both are from different space. [image: Smile]
I think your problem may be related to invalid frame sizes, you have to
skip a frame if width of height in the avcontext is 0 and reallocate the
texture if width or height is different from the ones of the texture.On Mon, Feb 3, 2014 at 1:21 PM, keestu wrote: