mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-14 11:33:43 +00:00
Fixed #169: Userspace fix for insufficient size of H.264 buffer
This commit is contained in:
@@ -220,7 +220,11 @@ static void _m2m_encoder_prepare(us_m2m_encoder_s *enc, const us_frame_s *frame)
|
|||||||
fmt.fmt.pix_mp.colorspace = V4L2_COLORSPACE_DEFAULT;
|
fmt.fmt.pix_mp.colorspace = V4L2_COLORSPACE_DEFAULT;
|
||||||
fmt.fmt.pix_mp.num_planes = 1;
|
fmt.fmt.pix_mp.num_planes = 1;
|
||||||
// fmt.fmt.pix_mp.plane_fmt[0].bytesperline = 0;
|
// fmt.fmt.pix_mp.plane_fmt[0].bytesperline = 0;
|
||||||
// fmt.fmt.pix_mp.plane_fmt[0].sizeimage = 512 << 10;
|
if (enc->output_format == V4L2_PIX_FMT_H264) {
|
||||||
|
// https://github.com/pikvm/ustreamer/issues/169
|
||||||
|
// https://github.com/raspberrypi/linux/pull/5232
|
||||||
|
fmt.fmt.pix_mp.plane_fmt[0].sizeimage = (1024 + 512) << 10; // 1.5Mb
|
||||||
|
}
|
||||||
_E_LOG_DEBUG("Configuring OUTPUT format ...");
|
_E_LOG_DEBUG("Configuring OUTPUT format ...");
|
||||||
_E_XIOCTL(VIDIOC_S_FMT, &fmt, "Can't set OUTPUT format");
|
_E_XIOCTL(VIDIOC_S_FMT, &fmt, "Can't set OUTPUT format");
|
||||||
if (fmt.fmt.pix_mp.pixelformat != enc->output_format) {
|
if (fmt.fmt.pix_mp.pixelformat != enc->output_format) {
|
||||||
|
|||||||
Reference in New Issue
Block a user