diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp index c73da27e8..43e9696f7 100644 --- a/src/zm_ffmpeg.cpp +++ b/src/zm_ffmpeg.cpp @@ -208,7 +208,7 @@ int hacked_up_context2_for_older_ffmpeg(AVFormatContext **avctx, AVOutputFormat } #endif - if (filename) strncpy(s->filename, filename, sizeof(s->filename)); + if (filename) strncpy(s->filename, filename, sizeof(s->filename)-1); *avctx = s; return 0; }