Thank you for your feedback Remi. Your are right but still, it seems like a common concept. In any case, based on this note from libvlc_video_set_format:
For each pixels plane, the scanline pitch must be bigger than or equal to the number of bytes per pixel multiplied by the pixel width.
Similarly, the number of scanlines must be bigger than of equal to the pixel height. We recommend that pitches and lines be multiple of 32.
I managed to solved the issue like this:
Code: Select all
UInt l_height;
UInt l_width;
if (libvlc_video_get_size(m_MediaPlayer, 0, &l_width, &l_height) == 0)
{
UInt l_pitch = l_width + (l_width % 32);
UInt l_channelCount = GetChannelCount();
libvlc_video_set_format(m_MediaPlayer, l_channelCount == 3 ? "RV24" : "RV32", l_pitch, l_height, l_pitch * l_channelCount);
CreatePixels(l_pitch, l_height);
}
Cheers,