Skip to content

Commit

Permalink
If ffmpeg can't figure out the sie of the stream, default to what we …
Browse files Browse the repository at this point in the history
…entered in monitor.
  • Loading branch information
Isaac Connor committed Dec 21, 2024
1 parent 13c9871 commit 4a23cfe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/zm_ffmpeg_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ int FfmpegCamera::OpenFfmpeg() {
#endif

zm_dump_stream_format(mFormatContext, mVideoStreamId, 0, 0);
if (!mVideoCodecContext->width) {
mVideoCodecContext->width = width;
mVideoCodecContext->height = height;
}

if ( use_hwaccel && (hwaccel_name != "") ) {
#if HAVE_LIBAVUTIL_HWCONTEXT_H
Expand Down

0 comments on commit 4a23cfe

Please sign in to comment.