I am trying to display yuv frames that i have received from ffmpeg. but while displaying the frames are not displayed in the landscape mode. it comes in reverse…
What could be the reason?
I am doing the below work.
…
-
window = SDL_CreateWindow (“Test ffmpeg”,SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 480, SDL_WINDOW_SHOWN|SDL_WINDOW_AL LOW_HIGHDPI);
-
renderer = SDL_CreateRenderer (window, -1, 0);
-
Get the codec context from Video Stream. say pCodecCtx
-
Find the decoder from codecContext , and open the decoder.
-
create texture texture1 = SDL_CreateTexture (renderer, SDL_PIXELFORMAT_IYUV, SDL_TEXTUREACCESS_STREAMING,800, 480);
-
Read packet from ffmpeg, and decode it, update texture1
rettexture = SDL_UpdateYUVTexture(texture1, NULL, pFrame->data[0], pFrame->linesize[0], pFrame->data[1], pF rame->linesize[1], pFrame->data[2], pFrame->linesize[2]); -
RenderCopy, RenderPresent,
What am i doing wrong?.. Kindly guide me.