I want to decode single frame of a H.264 video stream which is sent by server but when I do, the result picture has large padding. Code & Result: Code: now the result has large adding like this: What am I doing wrong? Rescaling the YUV image did not help and causes the picture to have 0 dimensions. (I put