SDL2.0 YUV frame display landscape is changed

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.

  1. window = SDL_CreateWindow (“Test ffmpeg”,SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 480, SDL_WINDOW_SHOWN|SDL_WINDOW_AL LOW_HIGHDPI);

  2. renderer = SDL_CreateRenderer (window, -1, 0);

  3. Get the codec context from Video Stream. say pCodecCtx

  4. Find the decoder from codecContext , and open the decoder.

  5. create texture texture1 = SDL_CreateTexture (renderer, SDL_PIXELFORMAT_IYUV, SDL_TEXTUREACCESS_STREAMING,800, 480);

  6. 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]);

  7. RenderCopy, RenderPresent,

What am i doing wrong?.. Kindly guide me.

I got to know the answer. Simple one. Need to add orientation in Android.xml file ;).