diff --git a/src/zm_video.cpp b/src/zm_video.cpp index 581be1b52..65e4a32e8 100644 --- a/src/zm_video.cpp +++ b/src/zm_video.cpp @@ -190,14 +190,15 @@ int X264MP4Writer::Close() { } int X264MP4Writer::Reset(const char* new_path) { - - VideoWriter::Reset(new_path); /* Close the encoder and file */ if(bOpen) Close(); - /* Reset variables */ + /* Reset common variables */ + VideoWriter::Reset(new_path); + + /* Reset local variables */ bFirstFrame = true; bGotH264AVCInfo = false; prevnals.clear();