mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-10-27 16:00:49 +08:00
修复:校验 V4L2 编码协商尺寸,避免送帧越界崩溃
This commit is contained in:
@@ -60,6 +60,7 @@ RUN dpkg --add-architecture armhf
|
||||
# Install cross-compiler and native build tools
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
patch \
|
||||
pkg-config \
|
||||
cmake \
|
||||
nasm \
|
||||
@@ -239,6 +240,9 @@ RUN github_prefix="" \
|
||||
&& make install \
|
||||
&& rm -rf /tmp/opus /tmp/opus.tar.gz
|
||||
|
||||
# Reject raw formats smaller than the requested frame before any V4L2 upload.
|
||||
COPY build/cross/patches/0001-v4l2-m2m-reject-undersized-encoder-format.patch /tmp/ffmpeg-v4l2-size.patch
|
||||
|
||||
# Download and build FFmpeg with RKMPP support
|
||||
RUN mkdir -p /tmp/ffmpeg-build && cd /tmp/ffmpeg-build \
|
||||
&& github_prefix="" \
|
||||
@@ -250,6 +254,7 @@ RUN mkdir -p /tmp/ffmpeg-build && cd /tmp/ffmpeg-build \
|
||||
&& git remote add origin "${github_prefix}https://github.com/nyanmisaka/ffmpeg-rockchip.git" \
|
||||
&& git fetch --depth 1 origin ${FFMPEG_ROCKCHIP_REV} \
|
||||
&& git checkout --detach FETCH_HEAD \
|
||||
&& patch -p1 < /tmp/ffmpeg-v4l2-size.patch \
|
||||
&& cd .. \
|
||||
# Build RKMPP
|
||||
&& mkdir -p rkmpp/build && cd rkmpp/build \
|
||||
|
||||
Reference in New Issue
Block a user